Annotation of embedaddon/php/ext/mysqli/tests/bug33491.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #33491 (extended mysqli class crashes when result is not object)
        !             3: --INI--
        !             4: error_reporting=4095
        !             5: --SKIPIF--
        !             6: <?php 
        !             7: require_once('skipif.inc'); 
        !             8: require_once('skipifconnectfailure.inc');
        !             9: ?>
        !            10: --FILE--
        !            11: <?php
        !            12: 
        !            13: class DB extends mysqli
        !            14: {
        !            15:   public function query_single($query) {
        !            16:     $result = parent::query($query);
        !            17:     $result->fetch_row(); // <- Here be crash
        !            18:   }
        !            19: }
        !            20: 
        !            21: require_once("connect.inc");
        !            22: 
        !            23: // Segfault when using the DB class which extends mysqli
        !            24: $DB = new DB($host, $user, $passwd, $db, $port, $socket);
        !            25: $DB->query_single('SELECT DATE()');
        !            26: 
        !            27: ?>
        !            28: --EXPECTF--
        !            29: Fatal error: Call to a member function fetch_row() on a non-object in %sbug33491.php on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>