• Resolved jamminjames

    (@jamminjames)


    We just upgraded to PHP 7.2 for security reasons, and are getting this error when we hit try to ‘Select Slides’ in CodeFlavor’s FA Lite slider plugin:

    ArgumentCountError thrown
    
    Too few arguments to function sgpb\Filters::editPopupPreviewLink(), 1 passed in /var/www/humortimes/wp-includes/class-wp-hook.php on line 286 and exactly 2 expected

    I reported it in the plugin’s forum, but since it’s referring to a wp-includes file, I thought it might be a problem with WordPress itself.

    What should I do? Thanks for any help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • No, the problem is in some plugin calling a hook (which is handled in WordPress). It is wanting 2 pieces of data and only one was provided. It is probably unrelated to PHP 7.2.

    Thread Starter jamminjames

    (@jamminjames)

    Thanks for the reply, Joy.

    I looked through the plugin code, and can’t find anything having to do with the error message given. Can you give me a hint as to how to track down the offending code?

    This problem wasn’t happening before, and the plugin was last Updated 2 years ago, so that’s why it seems it would have to be due to PHP 7 or the most recent WordPress update. (I have not updated to 5 yet, we are using the latest 4 version.)

    I realize 2 years is very old for a plugin, but it fits our needs, and I’d like to fix it, if possible. Then I could let the authors know what the problem is (they are still around, but say the problem is not caused by their plugin).

    Thank you!

    If you find the function mentioned sgpb\Filters::editPopupPreviewLink(), it will be expecting 2 parameters, but when it is called by WordPress (as a hook), there is only one parameter to pass.

    Thread Starter jamminjames

    (@jamminjames)

    I figured out what was causing it, it was another plugin (Popup Builder), and contacted them, and they patched it right away. Thanks for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘ArgumentCountError caused by wp-includes/class-wp-hook.php’ is closed to new replies.