MFB: Fixed test for systems where set_charset() method is unavailable.

This commit is contained in:
Ilia Alshanetsky 2006-07-13 15:42:55 +00:00
parent e49961c935
commit 3c75c080cf

View File

@ -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 */