diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2014-04-13 23:01:31 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2014-04-13 23:01:31 +0200 |
commit | beda5093b490e80f631f14555bba7216c284a2c3 (patch) | |
tree | 478c50552a9454dd2cff37a800f97d893d83a11a | |
parent | f07e37c96dd395305fe81192f2edbc8860e41d5d (diff) | |
download | php-git-beda5093b490e80f631f14555bba7216c284a2c3.tar.gz |
Reverted to 5a0da281e5a9fa02db18b4822d8b103c65849fa9
Discussion: http://news.php.net/php.cvs/76836
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/standard/array.c | 5 | ||||
-rw-r--r-- | ext/standard/tests/array/bug67064.phpt | 17 |
3 files changed, 1 insertions, 23 deletions
@@ -8,8 +8,6 @@ PHP NEWS UNIX sockets). (Mike) . Fixed bug #66182 (exit in stream filter produces segfault). (Mike) . Fixed bug #66736 (fpassthru broken). (Mike) - . Fixed bug #67064 (Countable interface prevents using 2nd parameter - ($mode) of count() function). (Bob) - Embed: . Fixed bug #65715 (php5embed.lib isn't provided anymore). (Anatol) diff --git a/ext/standard/array.c b/ext/standard/array.c index f807bb5ad1..c2efca58fc 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -333,10 +333,7 @@ PHP_FUNCTION(count) #ifdef HAVE_SPL /* if not and the object implements Countable we call its count() method */ if (Z_OBJ_HT_P(array)->get_class_entry && instanceof_function(Z_OBJCE_P(array), spl_ce_Countable TSRMLS_CC)) { - zval *mode_zv; - MAKE_STD_ZVAL(mode_zv); - Z_LVAL_P(mode_zv) = mode; - zend_call_method_with_1_params(&array, NULL, NULL, "count", &retval, mode_zv); + zend_call_method_with_0_params(&array, NULL, NULL, "count", &retval); if (retval) { convert_to_long_ex(&retval); RETVAL_LONG(Z_LVAL_P(retval)); diff --git a/ext/standard/tests/array/bug67064.phpt b/ext/standard/tests/array/bug67064.phpt deleted file mode 100644 index 2818516dac..0000000000 --- a/ext/standard/tests/array/bug67064.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -Bug #67064 (Countable interface prevents using 2nd parameter ($mode) of count() function) ---FILE-- -<?php -class Counter implements Countable { - public function count($mode = COUNT_NORMAL) { - var_dump($mode == COUNT_RECURSIVE); - return 1; - } -} - -$counter = new Counter; -var_dump(count($counter, COUNT_RECURSIVE)); -?> ---EXPECTF-- -bool(true) -int(1) |