com php-src: Revert "Fix bug #67064 in a BC safe way": NEWS ext/standard/array.c ext/standard/tests/array/bug67064.phpt
| From: | Bob Weinand | Date: | Wed, 30 Jul 2014 15:18:05 +0000 |
| Subject: | com php-src: Revert "Fix bug #67064 in a BC safe way": NEWS ext/standard/array.c ext/standard/tests/array/bug67064.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79672@lists.php.net to get a copy of this message | ||
Commit: 354ee12b73dbe20d0c4fa7883eb34714f89109df
Author: Bob Weinand <bobwei9@hotmail.com> Wed, 30 Jul 2014 17:18:05 +0200
Parents: f9258929201616750d418c629f7afdcfdab7dada
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=354ee12b73dbe20d0c4fa7883eb34714f89109df
Log:
Revert "Fix bug #67064 in a BC safe way"
This reverts commit 1a4a9eede59b853f11e8e8b965e5f715f53da8f7.
Conflicts:
ext/standard/array.c
ext/standard/tests/array/bug67064.phpt
Bugs:
https://bugs.php.net/67064
Changed paths:
M NEWS
M ext/standard/array.c
D ext/standard/tests/array/bug67064.phpt
Diff:
diff --git a/NEWS b/NEWS
index 70338ee..ba58827 100644
--- a/NEWS
+++ b/NEWS
@@ -3,7 +3,10 @@ PHP NEWS
?? ??? 2014, PHP 5.6.0 Release Candidate 4
- Core:
- . Fixed bug #67693 (incorrect push to the empty array) (Tjerk)
+ . Fixed bug #67693 (incorrect push to the empty array). (Tjerk)
+
+ - SPL:
+ . Revert fix for bug #67064 (BC issues). (Bob)
31 Jul 2014, PHP 5.6.0 Release Candidate 3
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 2792b86..cca2f25 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);
- ZVAL_LONG(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 2818516...0000000
--- 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)