Skip to content

Commit ebc33a3

Browse files
committed
Fix RedisArray::__construct bug
1 parent a5d5df4 commit ebc33a3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

redis_array.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,14 @@ PHP_METHOD(RedisArray, __construct)
158158
* Note: WRONG_PARAM_COUNT seems wrong but this is what we have been doing
159159
* for ages so we can't really change it until the next major version.
160160
*/
161-
if (Z_TYPE_P(z0) != IS_ARRAY && Z_TYPE_P(z0) != IS_STRING)
161+
if (Z_TYPE_P(z0) != IS_ARRAY && Z_TYPE_P(z0) != IS_STRING) {
162162
#if PHP_VERSION_ID < 80000
163163
WRONG_PARAM_COUNT;
164164
#else
165165
zend_argument_type_error(1, "must be of type string|array, %s given", zend_zval_type_name(z0));
166166
RETURN_THROWS();
167167
#endif
168+
}
168169

169170
/* If it's a string we want to load the array from ini information */
170171
if (Z_TYPE_P(z0) == IS_STRING) {

0 commit comments

Comments
 (0)