From: Nikita Popov Date: Fri, 22 Mar 2019 11:40:21 +0000 (+0100) Subject: Merge branch 'PHP-7.2' into PHP-7.3 X-Git-Tag: php-7.3.5RC1~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=620a753185e575c8d48779764f376f6227b6e293;p=php Merge branch 'PHP-7.2' into PHP-7.3 --- 620a753185e575c8d48779764f376f6227b6e293 diff --cc NEWS index e205855355,dbce1af299..499a43581d --- a/NEWS +++ b/NEWS @@@ -1,8 -1,11 +1,11 @@@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? 2019, PHP 7.2.18 +?? ??? ????, PHP 7.3.5 + - Reflection: + . Fixed bug #77772 (ReflectionClass::getMethods(null) doesn't work). (Nikita) + -04 Apr 2019, PHP 7.2.17 +28 Mar 2019, PHP 7.3.4 - Core: . Fixed bug #77738 (Nullptr deref in zend_compile_expr). (Laruence) diff --cc ext/reflection/php_reflection.c index 748f5b3f08,80e508c175..2fa073cbea --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@@ -4191,9 -4245,11 +4191,10 @@@ ZEND_METHOD(reflection_class, getMethod { reflection_object *intern; zend_class_entry *ce; - zend_long filter = ZEND_ACC_PPP_MASK | ZEND_ACC_ABSTRACT | ZEND_ACC_FINAL | ZEND_ACC_STATIC; + zend_long filter = 0; + zend_bool filter_is_null = 1; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &filter) == FAILURE) { - METHOD_NOTSTATIC(reflection_class_ptr); + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { return; } @@@ -4377,11 -4440,17 +4382,16 @@@ ZEND_METHOD(reflection_class, getProper { reflection_object *intern; zend_class_entry *ce; - zend_long filter = ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC; + zend_long filter = 0; + zend_bool filter_is_null = 1; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &filter) == FAILURE) { - METHOD_NOTSTATIC(reflection_class_ptr); + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { return; } + + if (filter_is_null) { + filter = ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC; + } GET_REFLECTION_OBJECT_PTR(ce);