xref: /php-src/ext/mysqli/tests/bug54674.phpt (revision 73d68693)
1--TEST--
2Bug #54674 mysqlnd valid_sjis_(head|tail) is using invalid operator and range.
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require_once 'skipifconnectfailure.inc';
8?>
9--INI--
10mysqli.max_links = 1
11mysqli.allow_persistent = Off
12mysqli.max_persistent = 0
13--FILE--
14<?php
15    include 'connect.inc';
16
17    $link = mysqli_init();
18    if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) {
19        printf("[002] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
20    }
21
22    $japanese_so = pack('H4', '835c');
23    $link->set_charset('sjis');
24    var_dump($link->real_escape_string($japanese_so) === $japanese_so);
25    mysqli_close($link);
26
27    print "done!";
28?>
29--EXPECT--
30bool(true)
31done!
32