Support » Plugin: Comments - wpDiscuz » Uncaught ArgumentCountError: Too few arguments to function WpdiscuzHelperOptim

  • Hey!
    I want to reopen an issue that I initially reported here: https://wporg.ibadboy.net/support/topic/fatal-error-in-cleancommentrelatedrows-function/

    We got the error again:

    30-Sep-2021 11:48:32 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function WpdiscuzHelperOptimization::cleanCommentRelatedRows(), 1 passed in /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php on line 292 and exactly 2 expected in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzHelperOptimization.php:180
    Stack trace:
    #0 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(292): WpdiscuzHelperOptimization->cleanCommentRelatedRows('985366')
    #1 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #2 /wordpress-versions/5.7.3/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #3 /dom21465/wp-content/plugins/akismet/class.akismet.php(421): do_action('deleted_comment', '985366')
    #4 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(292): Akismet::delete_old_comments()
    #5 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #6 /wordpress-versions/5.7.3/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
    #7 /wordpress- in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzHelperOptimization.php on line 180
    [01-Oct-2021 11:47:05 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function WpdiscuzHelperOptimization::cleanCommentRelatedRows(), 1 passed in /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php on line 292 and exactly 2 expected in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzHelperOptimization.php:180
    Stack trace:
    #0 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(292): WpdiscuzHelperOptimization->cleanCommentRelatedRows('985594')
    #1 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #2 /wordpress-versions/5.7.3/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #3 /dom21465/wp-content/plugins/akismet/class.akismet.php(421): do_action('deleted_comment', '985594')
    #4 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(292): Akismet::delete_old_comments()
    #5 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #6 /wordpress-versions/5.7.3/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
    #7 /wordpress- in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzHelperOptimization.php on line 180
    [02-Oct-2021 11:46:17 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function WpdiscuzHelperOptimization::cleanCommentRelatedRows(), 1 passed in /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php on line 292 and exactly 2 expected in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzHelperOptimization.php:180
    Stack trace:
    #0 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(292): WpdiscuzHelperOptimization->cleanCommentRelatedRows('985776')
    #1 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #2 /wordpress-versions/5.7.3/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #3 /dom21465/wp-content/plugins/akismet/class.akismet.php(421): do_action('deleted_comment', '985776')
    #4 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(292): Akismet::delete_old_comments()
    #5 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #6 /wordpress-versions/5.7.3/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
    #7 /wordpress- in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzHelperOptimization.php on line 180
    [03-Oct-2021 11:47:20 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function WpdiscuzHelperOptimization::cleanCommentRelatedRows(), 1 passed in /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php on line 292 and exactly 2 expected in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzHelperOptimization.php:180
    Stack trace:
    #0 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(292): WpdiscuzHelperOptimization->cleanCommentRelatedRows('985950')
    #1 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #2 /wordpress-versions/5.7.3/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #3 /dom21465/wp-content/plugins/akismet/class.akismet.php(421): do_action('deleted_comment', '985950')
    #4 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(292): Akismet::delete_old_comments()
    #5 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #6 /wordpress-versions/5.7.3/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
    #7 /wordpress- in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzHelperOptimization.php on line 180
    [04-Oct-2021 11:48:14 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function WpdiscuzHelperOptimization::cleanCommentRelatedRows(), 1 passed in /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php on line 292 and exactly 2 expected in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzHelperOptimization.php:180
    Stack trace:
    #0 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(292): WpdiscuzHelperOptimization->cleanCommentRelatedRows('986151')
    #1 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #2 /wordpress-versions/5.7.3/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #3 /dom21465/wp-content/plugins/akismet/class.akismet.php(421): do_action('deleted_comment', '986151')
    #4 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(292): Akismet::delete_old_comments()
    #5 /wordpress-versions/5.7.3/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #6 /wordpress-versions/5.7.3/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
    #7 /wordpress- in /dom21465/wp-content/plugins/wpdiscuz/utils/class.WpdiscuzHelperOptimization.php on line 180

    It doesn’t make sense to be having the issue again.
    We updated the plugin to the latest version.

    Can you look this up again?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Neycho Kalaydzhiev

    (@neychok)

    Hey, again.

    It seems that I overlooked that the second argument of the cleanCommentRelatedRows() function has to be optional.

    So it should become something like this:
    public function cleanCommentRelatedRows($commentId, $comment<strong> = null</strong>) {

    Hopefully, you don’t think of me as intrusive proposing code changes here and there :D.

    Best wishes,
    Neycho K.

    Plugin Support gVectors Support

    (@gvectorssupport)

    Hello Neycho K,

    Please wait for the next update. The issue should be fixed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.