diff options
author | foobar <sniper@php.net> | 2005-06-27 19:07:52 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2005-06-27 19:07:52 +0000 |
commit | b35224fa8107cc2f6a92818bb2fbdfd0c888a150 (patch) | |
tree | 8e336685c490b532f0f896e4638e2bc6112f0904 /ext/mysqli | |
parent | 1ac5cf874677558fcf623c084ae6f6e279051a56 (diff) | |
download | php-git-b35224fa8107cc2f6a92818bb2fbdfd0c888a150.tar.gz |
add test case
Diffstat (limited to 'ext/mysqli')
-rw-r--r-- | ext/mysqli/tests/bug33491.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/mysqli/tests/bug33491.phpt b/ext/mysqli/tests/bug33491.phpt new file mode 100644 index 0000000000..fb25c8ec63 --- /dev/null +++ b/ext/mysqli/tests/bug33491.phpt @@ -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 |