]> granicus.if.org Git - php/commitdiff
MF5.1: fix #34078 (Reflection API problems in methods with boolean or null default...
authorAntony Dovgal <tony2001@php.net>
Thu, 11 Aug 2005 21:32:57 +0000 (21:32 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 11 Aug 2005 21:32:57 +0000 (21:32 +0000)
(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

NEWS
Zend/zend_reflection_api.c
ext/reflection/php_reflection.c

diff --git a/NEWS b/NEWS
index 36b6a93022902d003f7a1598f392c600635fe555..94d94b79b981e34aed70ca52cd848829f09c0603 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,8 @@ PHP                                                                        NEWS
 - Fixed "make test" to work for phpized extensions. (Hartmut, Jani)
 - Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems.
   (Andrey)
+- Fixed bug #34078 (Reflection API problems in methods with boolean or null 
+  default values). (Tony)
 - Fixed bug #34064 (arr[] as param to function in class gives invalid opcode).
   (Dmitry)
 - Fixed bug #34062 (Crash in catch block when many arguments are used).
index 6034af75ce835c1d54e83f383f71fb611da68ab8..2bbd91bc982db7735321a241eb699bbdfae625e6 100644 (file)
@@ -1864,7 +1864,7 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
 
        zv_copy = precv->op2.u.constant;
        zv = &zv_copy;
-       zval_update_constant(&zv, (void*)1 TSRMLS_CC);
+       zval_update_constant(&zv, (void*)0 TSRMLS_CC);
        RETURN_ZVAL(zv, 1, 1);
 }
 /* }}} */
index 6034af75ce835c1d54e83f383f71fb611da68ab8..2bbd91bc982db7735321a241eb699bbdfae625e6 100644 (file)
@@ -1864,7 +1864,7 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
 
        zv_copy = precv->op2.u.constant;
        zv = &zv_copy;
-       zval_update_constant(&zv, (void*)1 TSRMLS_CC);
+       zval_update_constant(&zv, (void*)0 TSRMLS_CC);
        RETURN_ZVAL(zv, 1, 1);
 }
 /* }}} */