]> granicus.if.org Git - php/commitdiff
fixed bug #29522
authorGeorg Richter <georg@php.net>
Wed, 4 Aug 2004 12:28:09 +0000 (12:28 +0000)
committerGeorg Richter <georg@php.net>
Wed, 4 Aug 2004 12:28:09 +0000 (12:28 +0000)
ext/mysqli/mysqli.c

index a51338ad338a361fbdd1f6075753a06974cd40b1..875acefbff257daf27f1ce88165590a424dcd2cf 100644 (file)
@@ -200,6 +200,12 @@ zval *mysqli_read_property(zval *object, zval *member, int type TSRMLS_DC)
                ret = zend_hash_find(obj->prop_handler, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) &hnd);
        }
        if (ret == SUCCESS) {
+               /* check if connection is still valid */
+               if (!obj->ptr) {
+                       retval = EG(uninitialized_zval_ptr);
+                       return(retval);
+               }
+
                ret = hnd->read_func(obj, &retval TSRMLS_CC);
                if (ret == SUCCESS) {
                        /* ensure we're creating a temporary variable */