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
changed the title [-]'#^@param array \$sub_field does not accept actual type of parameter\: int\|false\.$#'[/-][+]PHPStan: correct includes/acf-field-functions.php[/+]on Mar 4, 2025
). the easy fix would be to avoid having a return in the function, but I'm hesitant to change that since other themes could be reliant on that function.
I've seen this elsewhere is the original code. They're using add_action when they're treating it as add_filter. Behind the scenes, it all works (e.g. apply_filters will run things added via add_action), but it's not correct.
I only glanced at it, but my suggestion is updating it to add_filter on 334.
Activity
[-]'#^@param array \$sub_field does not accept actual type of parameter\: int\|false\.$#'[/-][+]PHPStan: correct includes/acf-field-functions.php[/+]pkevan commentedon Apr 23, 2025
Started looking at these in an attempt to clear out some issues, and in this particular one, the hardest one to fix is:
which relates to (
secure-custom-fields/includes/acf-field-functions.php
Lines 293 to 334 in 10d896b
Thoughts?
kraftbj commentedon Apr 23, 2025
I've seen this elsewhere is the original code. They're using
add_actionwhen they're treating it asadd_filter. Behind the scenes, it all works (e.g. apply_filters will run things added via add_action), but it's not correct.I only glanced at it, but my suggestion is updating it to
add_filteron 334.pkevan commentedon Apr 23, 2025
🤦 of course - spent too long looking at it to not see that!