From: Johannes Schlüter Date: Wed, 12 Apr 2006 19:30:52 +0000 (+0000) Subject: - MFH: Fix bug #37060 (Type of retval of Countable::count() is not checked) X-Git-Tag: php-5.1.3RC3~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9047558fe386687dcae52512595eeaecb5a89988;p=php - MFH: Fix bug #37060 (Type of retval of Countable::count() is not checked) --- diff --git a/NEWS b/NEWS index 8cab0cfcc3..26763079c8 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Apr 2006, PHP 5.1.3 +- Fixed bug #37060 (Type of retval of Countable::count() is not checked). + (Johannes) - FIxed bug #37059 (oci_bind_by_name() doesn't support RAW and LONG RAW fields). (Tony) - Fixed bug #37057 (xmlrpc_decode() may produce arrays with numeric strings, diff --git a/ext/standard/array.c b/ext/standard/array.c index 6cc929ba4b..077ab77512 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -313,6 +313,7 @@ PHP_FUNCTION(count) if (Z_OBJ_HT_P(array)->get_class_entry && instanceof_function(Z_OBJCE_P(array), spl_ce_Countable TSRMLS_CC)) { zend_call_method_with_0_params(&array, NULL, NULL, "count", &retval); if (retval) { + convert_to_long(retval); RETVAL_LONG(Z_LVAL_P(retval)); zval_ptr_dtor(&retval); }