. Indirect reference to $this fails to resolve if direct $this is never used
in method. (Scott)
+- Core:
+ . Bug 48484 (array_product() always returns 0 for an empty array). (Ilia)
+
- Filter extension:
. Fixed bug #53150 (FILTER_FLAG_NO_RES_RANGE is missing some IP ranges).
(Ilia)
return;
}
+ ZVAL_LONG(return_value, 1);
if (!zend_hash_num_elements(Z_ARRVAL_P(input))) {
- RETURN_LONG(0);
+ return;
}
- ZVAL_LONG(return_value, 1);
for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(input), &pos);
zend_hash_get_current_data_ex(Z_ARRVAL_P(input), (void **)&entry, &pos) == SUCCESS;
--EXPECTF--
Warning: array_product() expects parameter 1 to be array, string given in %s on line %d
NULL
-int(0)
+int(1)
int(0)
int(3)
int(9)
--EXPECTF--
Warning: array_product() expects parameter 1 to be array, string given in %s on line %d
NULL
-int(0)
+int(1)
int(0)
int(3)
int(9)
--- /dev/null
+--TEST--
+Bug 48484 (array_product() always returns 0 for an empty array)
+--FILE--
+<?php
+var_dump(array_product(array()));
+?>
+--EXPECT--
+int(1)
+--TEST--
+Bug 48484 (array_product() always returns 0 for an empty array)
+--FILE--
+<?php
+var_dump(array_product(array()));
+?>
+--EXPECT--
+int(1)