1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00

add test case

This commit is contained in:
foobar
2005-06-27 19:07:52 +00:00
parent 1ac5cf8746
commit b35224fa81
+24
View File
@@ -0,0 +1,24 @@
--TEST--
Bug #33491 (extended mysqli class crashes when result is not object)
--INI--
error_reporting=4095
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
class DB extends mysqli
{
public function query_single($query) {
$result = parent::query($query);
$result->fetch_row(); // <- Here be crash
}
}
// Segfault when using the DB class which extends mysqli
$DB = new DB('localhost', 'root', '', '');
$DB->query_single('SELECT DATE()');
?>
--EXPECTF--
Fatal error: Call to a member function fetch_row() on a non-object in %sbug33491.php on line %d