@@ -351,6 +351,12 @@ int _check_inherited_return_type(
351
351
return _check_inherited_arg_info (fe , fe_arg_info , proto , proto_arg_info , COVARIANT );
352
352
}
353
353
354
+
355
+ static zend_bool _missing_internal_arginfo (zend_function const * fn )
356
+ {
357
+ return !fn -> common .arg_info && fn -> common .type == ZEND_INTERNAL_FUNCTION ;
358
+ }
359
+
354
360
static
355
361
int _check_inherited_parameter_type (
356
362
const zend_function * fe , zend_arg_info * fe_arg_info ,
@@ -384,7 +390,7 @@ static int zend_do_perform_implementation_check(const zend_function *fe, const z
384
390
* we still need to do the arg number checks. We are only willing to ignore this for internal
385
391
* functions because extensions don't always define arg_info.
386
392
*/
387
- if (! proto -> common . arg_info && proto -> common . type != ZEND_USER_FUNCTION ) {
393
+ if (_missing_internal_arginfo ( proto ) ) {
388
394
return 1 ;
389
395
}
390
396
@@ -2035,8 +2041,18 @@ ZEND_API void zend_verify_variance(zend_class_entry *ce) /* {{{ */
2035
2041
2036
2042
ZEND_HASH_FOREACH_PTR (& ce -> function_table , child ) {
2037
2043
zend_function * parent = child -> common .prototype ;
2038
- /* If the parenttype method is private do not enforce a signature */
2039
- if (parent && !(parent -> common .fn_flags & ZEND_ACC_PRIVATE )) {
2044
+ if (!parent ) {
2045
+ continue ;
2046
+ }
2047
+
2048
+ /* We are only willing to ignore this for internal functions because
2049
+ * extensions don't always define arg_info. */
2050
+ if (_missing_internal_arginfo (parent )) {
2051
+ continue ;
2052
+ }
2053
+
2054
+ /* If the parenttype method is private do not enforce a signature */
2055
+ if (!(parent -> common .fn_flags & ZEND_ACC_PRIVATE )) {
2040
2056
uint32_t i , num_args ;
2041
2057
2042
2058
/* Checks for constructors only if they are declared in an interface,
0 commit comments