mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
MFB: Fixed test for systems where set_charset() method is unavailable.
This commit is contained in:
parent
e49961c935
commit
3c75c080cf
@ -17,7 +17,11 @@ bug #36802 : crashes with mysql_init
|
||||
$mysql = mysqli_init();
|
||||
|
||||
/* following operations should not work */
|
||||
$x[0] = @$mysql->set_charset('utf8');
|
||||
if (method_exists($mysql, 'set_charset')) {
|
||||
$x[0] = @$mysql->set_charset('utf8');
|
||||
} else {
|
||||
$x[0] = NULL;
|
||||
}
|
||||
$x[1] = @$mysql->query("SELECT 'foo' FROM DUAL");
|
||||
|
||||
/* following operations should work */
|
||||
|
Loading…
Reference in New Issue
Block a user