summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2014-04-13 23:03:53 +0200
committerBob Weinand <bobwei9@hotmail.com>2014-04-13 23:03:53 +0200
commitbf3edbada68cb99f4c67f60fe113a6cf0b44e0fa (patch)
treebea86fc96e98e0297079239feaa005295b1797d7
parent191d9fc22740ba99968a6275c8d5a96460a66dbf (diff)
parentbeda5093b490e80f631f14555bba7216c284a2c3 (diff)
downloadphp-git-bf3edbada68cb99f4c67f60fe113a6cf0b44e0fa.tar.gz
Merge branch 'PHP-5.4' into PHP-5.5
-rw-r--r--NEWS2
-rw-r--r--ext/standard/array.c5
-rw-r--r--ext/standard/tests/array/bug67064.phpt17
3 files changed, 1 insertions, 23 deletions
diff --git a/NEWS b/NEWS
index 67ac75aad4..cb6c695854 100644
--- a/NEWS
+++ b/NEWS
@@ -8,8 +8,6 @@ PHP NEWS
. Fixed bug #66182 (exit in stream filter produces segfault). (Mike)
. Fixed bug #66736 (fpassthru broken). (Mike)
. Fixed bug #67043 (substr_compare broke by previous change) (Tjerk)
- . 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 a1f33178ad..1a29afa6dc 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)