• Having upgraded to PHP 7.3 I’m getting the following errors:

    NOTICE: wp-includes/class-wp-comment-query.php:853 – compact(): Undefined variable: limits
    require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/graphene/page.php’), get_template_part, locate_template, load_template, require(‘/themes/graphene/loop-page.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, bp_replace_the_content, apply_filters(‘bp_replace_the_content’), WP_Hook->apply_filters, BP_Members_Theme_Compat->single_dummy_content, bp_buffer_template_part, bp_get_template_part, bp_locate_template, load_template, require(‘/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/home.php’), bp_get_template_part, bp_locate_template, load_template, require(‘/themes/graphene-child/buddypress/members/single/profile.php’), bp_get_template_part, bp_locate_template, load_template, require(‘/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/activity-loop.php’), bp_has_activities, BP_Activity_Template->__construct, bp_activity_get, BP_Activity_Activity::get, apply_filters(‘bp_activity_get_where_conditions’), WP_Hook->apply_filters, bp_docs_access_protection_for_activity_feed, BP_Docs_Access_Query->get_comment_ids, get_comments, WP_Comment_Query->query, WP_Comment_Query->get_comments, WP_Comment_Query->get_comment_ids, compact
    NOTICE: wp-includes/class-wp-comment-query.php:853 – compact(): Undefined variable: groupby
    require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/graphene/page.php’), get_template_part, locate_template, load_template, require(‘/themes/graphene/loop-page.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, bp_replace_the_content, apply_filters(‘bp_replace_the_content’), WP_Hook->apply_filters, BP_Members_Theme_Compat->single_dummy_content, bp_buffer_template_part, bp_get_template_part, bp_locate_template, load_template, require(‘/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/home.php’), bp_get_template_part, bp_locate_template, load_template, require(‘/themes/graphene-child/buddypress/members/single/profile.php’), bp_get_template_part, bp_locate_template, load_template, require(‘/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/activity-loop.php’), bp_has_activities, BP_Activity_Template->__construct, bp_activity_get, BP_Activity_Activity::get, apply_filters(‘bp_activity_get_where_conditions’), WP_Hook->apply_filters, bp_docs_access_protection_for_activity_feed, BP_Docs_Access_Query->get_comment_ids, get_comments, WP_Comment_Query->query, WP_Comment_Query->get_comments, WP_Comment_Query->get_comment_ids, compact

    You can see from the trace that these stem from BP Docs, the PHP manual for compact() has a note to say from 7.3 strings that are not set will be warned. I’m uncertain if this is a BP Docs issue or if it’s something missing in WP since I can’t see a problem with the originating get_comments() call.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author David Cavins

    (@dcavins)

    Thanks, @venutius, for flagging this issue. We’ll look into it. ??

    It’s a WP core issue.

    It’s an issue in WP core, at least 4.9.10 that I’m using

    Alex

    (@hiphoptimespbru)

    Please help to fix this issue. Thank you in advance

    • This reply was modified 5 years, 4 months ago by Alex.
    Plugin Author David Cavins

    (@dcavins)

    I just set up a fresh test installation using PHP 7.3 and the latest WP, BP and BP Docs and I’m not encountering any errors or even notices.

    If someone is seeing errors still, please let me know how I can recreate.

    Thanks!

    -David

    It happens to me using PHP 7.3 and WordPress 4.9.10.

    It is a core issue. That said. I fixed it locally by adding the following code just belown line 820 of wp-includes/class-wp-comment-query.php

    $groupby = ”;

    It may not seem like a big deal, but it’s a very visible issue when you use comments on your site. This error notice also appears in the dashboard.

    • This reply was modified 5 years, 3 months ago by Andrew Woods. Reason: corrected my wordpress version for accuracy
    Plugin Author David Cavins

    (@dcavins)

    Thanks! It sounds like the fix is to upgrade to a newer version of WP, then?

    -David

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘PHP Error with 7.3’ is closed to new replies.