From 161b37ffbc193b6d5d1c88f21a08d3c8488e01e2 Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Wed, 4 Aug 2004 12:28:09 +0000 Subject: [PATCH] fixed bug #29522 --- ext/mysqli/mysqli.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index a51338ad33..875acefbff 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -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 */ -- 2.50.1