File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
mysqli /
tests /
bug36802.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:58 2012 UTC (13 years, 1 month ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Bug #36802 (crashes with with mysqli_set_charset())
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
class really_my_mysqli extends mysqli {
function __construct()
{
}
}
require_once("connect.inc");
$mysql = mysqli_init();
/* following operations should not work */
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 */
$x[2] = ($mysql->client_version > 0);
$x[3] = $mysql->errno;
$mysql->close();
var_dump($x);
?>
--EXPECT--
array(4) {
[0]=>
NULL
[1]=>
NULL
[2]=>
bool(true)
[3]=>
int(0)
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>