From: Ilia Alshanetsky Date: Thu, 13 Jul 2006 15:42:43 +0000 (+0000) Subject: Fixed test for systems where set_charset() method is unavailable. X-Git-Tag: php-5.2.0RC1~108 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab6d4d411a824fd21d3b1bd86d6076a14c824683;p=php Fixed test for systems where set_charset() method is unavailable. --- diff --git a/ext/mysqli/tests/bug36802.phpt b/ext/mysqli/tests/bug36802.phpt index 69ef56bba0..99f8633301 100644 --- a/ext/mysqli/tests/bug36802.phpt +++ b/ext/mysqli/tests/bug36802.phpt @@ -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 */