diff -up php-5.2.17/ext/standard/array.c.bug-48484 php-5.2.17/ext/standard/array.c --- php-5.2.17/ext/standard/array.c.bug-48484 2010-11-20 04:06:44.000000000 +0600 +++ php-5.2.17/ext/standard/array.c 2011-08-28 00:21:52.000000000 +0700 @@ -4368,11 +4368,11 @@ PHP_FUNCTION(array_product) php_error_docref(NULL TSRMLS_CC, E_WARNING, "The argument should be an array"); return; } - + + ZVAL_LONG(return_value, 1); if (!zend_hash_num_elements(Z_ARRVAL_PP(input))) { - RETURN_LONG(0); + return; } - ZVAL_LONG(return_value, 1); for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(input), &pos); zend_hash_get_current_data_ex(Z_ARRVAL_PP(input), (void **)&entry, &pos) == SUCCESS;