johannes                Wed Apr 12 19:30:52 2006 UTC

  Modified files:              (Branch: PHP_5_1)
    /php-src    NEWS 
    /php-src/ext/standard       array.c 
  Log:
  - MFH: Fix bug #37060 (Type of retval of Countable::count() is not checked)
  
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.510&r2=1.2027.2.511&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.510 php-src/NEWS:1.2027.2.511
--- php-src/NEWS:1.2027.2.510   Wed Apr 12 19:21:34 2006
+++ php-src/NEWS        Wed Apr 12 19:30:52 2006
@@ -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, 
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/array.c?r1=1.308.2.20&r2=1.308.2.21&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.20 
php-src/ext/standard/array.c:1.308.2.21
--- php-src/ext/standard/array.c:1.308.2.20     Wed Mar 22 22:05:51 2006
+++ php-src/ext/standard/array.c        Wed Apr 12 19:30:52 2006
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: array.c,v 1.308.2.20 2006/03/22 22:05:51 tony2001 Exp $ */
+/* $Id: array.c,v 1.308.2.21 2006/04/12 19:30:52 johannes Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -313,6 +313,7 @@
                        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);
                                }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to