]> granicus.if.org Git - php/commitdiff
Fixed test for systems where set_charset() method is unavailable.
authorIlia Alshanetsky <iliaa@php.net>
Thu, 13 Jul 2006 15:42:43 +0000 (15:42 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 13 Jul 2006 15:42:43 +0000 (15:42 +0000)
ext/mysqli/tests/bug36802.phpt

index 69ef56bba072649df0da6a3122633ae352fefdd7..99f8633301ced237d7dbe7c9d18b5966d569214b 100644 (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 */