Title: PHP Error with 7.3
Last modified: December 16, 2018

---

# PHP Error with 7.3

 *  [Venutius](https://wordpress.org/support/users/venutius/)
 * (@venutius)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/php-error-with-7-3/)
 * 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](https://wordpress.org/support/users/dcavins/)
 * (@dcavins)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/php-error-with-7-3/#post-10995055)
 * Thanks, [@venutius](https://wordpress.org/support/users/venutius/), for flagging
   this issue. We’ll look into it. 🙂
 *  [DrLightman](https://wordpress.org/support/users/drlightman/)
 * (@drlightman)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-error-with-7-3/#post-11368303)
 * It’s a WP core issue.
 *  [DrLightman](https://wordpress.org/support/users/drlightman/)
 * (@drlightman)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-error-with-7-3/#post-11368308)
 * It’s an issue in WP core, at least 4.9.10 that I’m using
 *  [Alex](https://wordpress.org/support/users/hiphoptimespbru/)
 * (@hiphoptimespbru)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/php-error-with-7-3/#post-11770434)
 * Please help to fix this issue. Thank you in advance
    -  This reply was modified 6 years, 10 months ago by [Alex](https://wordpress.org/support/users/hiphoptimespbru/).
 *  Plugin Author [David Cavins](https://wordpress.org/support/users/dcavins/)
 * (@dcavins)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/php-error-with-7-3/#post-11771540)
 * 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
 *  [Andrew Woods](https://wordpress.org/support/users/awoods/)
 * (@awoods)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/php-error-with-7-3/#post-11871822)
 * 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 6 years, 9 months ago by [Andrew Woods](https://wordpress.org/support/users/awoods/).
      Reason: corrected my wordpress version for accuracy
 *  Plugin Author [David Cavins](https://wordpress.org/support/users/dcavins/)
 * (@dcavins)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/php-error-with-7-3/#post-11871938)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/buddypress-docs.svg)
 * [BuddyPress Docs](https://wordpress.org/plugins/buddypress-docs/)
 * [Support Threads](https://wordpress.org/support/plugin/buddypress-docs/)
 * [Active Topics](https://wordpress.org/support/plugin/buddypress-docs/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/buddypress-docs/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/buddypress-docs/reviews/)

 * 7 replies
 * 5 participants
 * Last reply from: [David Cavins](https://wordpress.org/support/users/dcavins/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/php-error-with-7-3/#post-11871938)
 * Status: not resolved