Commit: 8f5a534b215905790a4dd5465804c1fbc21468c4 Author: Xinchen Hui <larue...@php.net> Sat, 27 Apr 2013 23:41:31 +0800 Parents: d54432ed98e1ba563677d40f32f5bb10124478af Branches: PHP-5.4 PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8f5a534b215905790a4dd5465804c1fbc21468c4 Log: Fixed bug #64726 (Segfault when calling fetch_object on a use_result and DB pointer has closed) Bugs: https://bugs.php.net/64726 Changed paths: M NEWS M ext/mysqli/mysqli.c M ext/mysqli/tests/bug64726.phpt Diff: diff --git a/NEWS b/NEWS index 5987131..3d37baf 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,10 @@ PHP NEWS - Fileinfo: . Upgraded libmagic to 5.14. (Anatol) +- MySQLi: + . Fixed bug #64726 (Segfault when calling fetch_object on a use_result and DB + pointer has closed). (Laruence) + - Zip: . Fixed bug #64342 (ZipArchive::addFile() has to check for file existence). (Anatol) diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index a4c1b87..45e39d0 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -1257,7 +1257,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags php_mysqli_fetch_into_hash_aux(return_value, result, fetchtype TSRMLS_CC); - if (into_object && Z_TYPE_P(return_value) != IS_NULL) { + if (into_object && Z_TYPE_P(return_value) == IS_ARRAY) { zval dataset = *return_value; zend_fcall_info fci; zend_fcall_info_cache fcc; diff --git a/ext/mysqli/tests/bug64726.phpt b/ext/mysqli/tests/bug64726.phpt index 3e43916..1f9bbaa 100644 --- a/ext/mysqli/tests/bug64726.phpt +++ b/ext/mysqli/tests/bug64726.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #63398 (Memleak when calling fetch_object on a use_result and DB pointer has closed) +Bug #63398 (Segfault when calling fetch_object on a use_result and DB pointer has closed) --SKIPIF-- <?php require_once('skipif.inc'); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php