]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4' into PHP-8.0
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 24 Nov 2020 15:42:52 +0000 (16:42 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 24 Nov 2020 15:42:52 +0000 (16:42 +0100)
* PHP-7.4:
  Fix usage of casted string in ReflectionParameter ctor

1  2 
ext/reflection/php_reflection.c

index 114b2c273ff19362cf7144a260a52ec7a6efdfc8,6384e2b4104edba4c607c4bcd6e720d71a34154f..dfa084caa5853964609e83dd5792ac88fcdafdbf
@@@ -2306,11 -2306,11 +2306,11 @@@ ZEND_METHOD(ReflectionParameter, __cons
                                        /* nothing to do. don't set is_closure since is the invoke handler,
                                           not the closure itself */
                                } else if ((fptr = zend_hash_find_ptr(&ce->function_table, lcname)) == NULL) {
+                                       zend_throw_exception_ex(reflection_exception_ptr, 0,
+                                               "Method %s::%s() does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(name));
                                        zend_string_release(name);
                                        zend_string_release(lcname);
-                                       zend_throw_exception_ex(reflection_exception_ptr, 0,
-                                               "Method %s::%s() does not exist", ZSTR_VAL(ce->name), Z_STRVAL_P(method));
 -                                      return;
 +                                      RETURN_THROWS();
                                }
                                zend_string_release(name);
                                zend_string_release(lcname);