summaryrefslogtreecommitdiff
path: root/ext/standard/array.c
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2006-04-12 19:30:52 +0000
committerJohannes Schlüter <johannes@php.net>2006-04-12 19:30:52 +0000
commit9047558fe386687dcae52512595eeaecb5a89988 (patch)
tree08b1cb00f78f43fe8e811a5d735afe2525c37a04 /ext/standard/array.c
parent5751903b1baad353521a47a0421c57ea16f614f5 (diff)
downloadphp-git-9047558fe386687dcae52512595eeaecb5a89988.tar.gz
- MFH: Fix bug #37060 (Type of retval of Countable::count() is not checked)
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r--ext/standard/array.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 6cc929ba4b..077ab77512 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -313,6 +313,7 @@ PHP_FUNCTION(count)
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);
}