]> granicus.if.org Git - php/commitdiff
- MFH: Fix bug #37060 (Type of retval of Countable::count() is not checked)
authorJohannes Schlüter <johannes@php.net>
Wed, 12 Apr 2006 19:30:52 +0000 (19:30 +0000)
committerJohannes Schlüter <johannes@php.net>
Wed, 12 Apr 2006 19:30:52 +0000 (19:30 +0000)
NEWS
ext/standard/array.c

diff --git a/NEWS b/NEWS
index 8cab0cfcc3cc239ca1bdc14a04b44e68fbd22490..26763079c8cc283f46ded2b10410d95131e13fc1 100644 (file)
--- 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, 
index 6cc929ba4b4b201f84ad933dbec6da4e2e3d3e4f..077ab77512a9c50fad054a4c92988136efab68db 100644 (file)
@@ -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);
                                }