• Resolved mtfalk

    (@mtfalk)


    We recently updated to PHP 8.1 on our server from PHP 7.4, and our site is crashing on a call to the WP function comment_form() now seemingly due to a bug in the ActiveCampaign for WooCommerce plugin.

    This the code in our comments.php template that causes the new fatal error:

    comment_form( array(
    	'class_form'         => 'section-inner',
    	'title_reply_before' => '<h2 id="reply-title">',
    	'title_reply_after'  => '</h2>',
    	'comment_notes_before' => '',
    	'label_submit'       => 'Submit',
    	'class_submit'       => 'btn btn-white',
    	'id_submit'          => 'comment-submit-button',
    	'name_submit'        => 'comment-submit-button',
    	'submit_button'      => '<input name="%1$s" type="button" role="button" id="%2$s" class="%3$s" value="%4$s" />'
    ) );
    

    This is the stack trace:

    [01-Dec-2023 15:22:40 UTC] PHP Fatal error:  Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method ActiveCampaignSubscriptions::update_comment_form_title() cannot be called statically in /code/wp-includes/class-wp-hook.php:324
    Stack trace:
    #0 /code/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
    #1 /code/wp-includes/comment-template.php(2651): apply_filters('comment_form_de...', Array)
    #2 /code/wp-content/themes/my-theme/comments.php(86): comment_form(Array)
    #3 /code/wp-includes/comment-template.php(1618): require('/code/wp-conten...')
    #4 /code/wp-content/themes/my-theme/single-recipes.php(16): comments_template()
    #5 /code/wp-includes/template-loader.php(106): include('/code/wp-conten...')
    #6 /code/wp-blog-header.php(19): require_once('/code/wp-includ...')
    #7 /code/index.php(17): require('/code/wp-blog-h...')
    #8 {main}
      thrown in /code/wp-includes/class-wp-hook.php on line 324

    WP and all plugins are fully up to date. Is this a known issue with ActiveCampaign for WooCommerce?

    Edit: Sorry, this may not actually be related to ActiveCampaign for WooCommerce, it may be related to the regular ActiveCampaign plugin. There was a warning immediately above this error that made me assume it was ActiveCampaign for WooCommerce.

    PHP Deprecated:  preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /code/wp-content/plugins/activecampaign-for-woocommerce/admin/class-activecampaign-for-woocommerce-admin.php on line 128
Viewing 1 replies (of 1 total)
  • Thread Starter mtfalk

    (@mtfalk)

    My mistake, this turned out to be unrelated to ActiveCampaign for WooCommerce. I don’t see a way to delete this thread, but I’m marking it as resolved.

Viewing 1 replies (of 1 total)
  • The topic ‘Fatal error with comment_form() on PHP 8.1’ is closed to new replies.