xref: /PHP-7.0/ext/mysqli/tests/bug54674.phpt (revision d4ae5bd9)
1--TEST--
2Bug #54674 mysqlnd valid_sjis_(head|tail) is using invalid operator and range.
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7?>
8--INI--
9mysqli.max_links = 1
10mysqli.allow_persistent = Off
11mysqli.max_persistent = 0
12mysqli.reconnect = Off
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--EXPECTF--
30bool(true)
31done!
32