Skip to content

Commit b58f366

Browse files
committed
MF5.1: fix #34078 (Reflection API problems in methods with boolean or null default values)
(andrei said to sara a few hours ago you may commit whatever you want until 9pm) (c) helly if there are any problems with this patch - please tell me, I'll revert it immediately
1 parent ef36d69 commit b58f366

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ PHP NEWS
2020
- Fixed "make test" to work for phpized extensions. (Hartmut, Jani)
2121
- Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems.
2222
(Andrey)
23+
- Fixed bug #34078 (Reflection API problems in methods with boolean or null
24+
default values). (Tony)
2325
- Fixed bug #34064 (arr[] as param to function in class gives invalid opcode).
2426
(Dmitry)
2527
- Fixed bug #34062 (Crash in catch block when many arguments are used).

Zend/zend_reflection_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,7 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
18641864

18651865
zv_copy = precv->op2.u.constant;
18661866
zv = &zv_copy;
1867-
zval_update_constant(&zv, (void*)1 TSRMLS_CC);
1867+
zval_update_constant(&zv, (void*)0 TSRMLS_CC);
18681868
RETURN_ZVAL(zv, 1, 1);
18691869
}
18701870
/* }}} */

ext/reflection/php_reflection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,7 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
18641864

18651865
zv_copy = precv->op2.u.constant;
18661866
zv = &zv_copy;
1867-
zval_update_constant(&zv, (void*)1 TSRMLS_CC);
1867+
zval_update_constant(&zv, (void*)0 TSRMLS_CC);
18681868
RETURN_ZVAL(zv, 1, 1);
18691869
}
18701870
/* }}} */

0 commit comments

Comments
 (0)