You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Plugin.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1044,7 +1044,9 @@ public static function getFunctionParams( FunctionParamsProviderEvent $event ) :
1044
1044
$return_type = $hook['types'][0];
1045
1045
1046
1046
// for bool we can use 0, so "__return_true" and "__return_false" can be used without error, as for bool only (!) filters the previous value doesn't matter
1047
-
if ( $return_type->isBool() ) {
1047
+
// allow this for "mixed" too, since it could be bool and we don't want to force types on badly/non-documented filters
1048
+
// same for single int type, where any previously filtered in values are often irrelevant
1049
+
if ( $return_type->isBool() || $return_type->isMixed() || $return_type->isInt() ) {
0 commit comments