Opened 15 years ago
Closed 14 years ago
#1728 closed defect (bug) (fixed)
[patch] Notices revealed with WP_DEBUG
Reported by: | kristarella | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | major |
Severity: | Version: | ||
Component: | Activity | Keywords: | has-patch, needs-testing |
Cc: |
Description
I was testing out themes and child themes and turned on WP_DEBUG, which revealed the following notices on a fresh install of WP 2.9.1.
When logged into the admin and performing an action like activating a theme or activating/deactivating a plugin these notices are all that come up, the dashboard doesn't load.
Notice: Undefined offset: 0 in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php on line 72 Notice: Trying to get property of non-object in /Users/kristen/Sites/testing/wp-includes/query.php on line 367 Notice: Undefined offset: 0 in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php on line 97 Notice: Undefined offset: 0 in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php on line 104 Notice: Undefined offset: 0 in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php on line 130 Notice: Use of undefined constant VHOST - assumed 'VHOST' in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php on line 132 Notice: Undefined offset: 0 in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php on line 138 Notice: Undefined offset: 1 in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php on line 141 Notice: Use of undefined constant VHOST - assumed 'VHOST' in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php on line 151 Notice: Undefined property: stdClass::$loggedin_user in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-forums.php on line 433 Notice: Trying to get property of non-object in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-forums.php on line 433 Notice: Undefined property: stdClass::$displayed_user in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core.php on line 1005 Notice: Trying to get property of non-object in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core.php on line 1005 Notice: Undefined property: stdClass::$profile in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-classes.php on line 796 Notice: Undefined property: stdClass::$current_group in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-groups.php on line 224 Notice: Trying to get property of non-object in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-groups.php on line 224 Notice: Undefined variable: count_indicator in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-messages.php on line 115 Notice: Undefined index: action in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-signup.php on line 269 Notice: Undefined index: action in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core.php on line 1894 Notice: Undefined offset: 0 in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php on line 253 Notice: Undefined property: stdClass::$is_directory in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-templatetags.php on line 869 Notice: Undefined property: stdClass::$is_directory in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-templatetags.php on line 869 Notice: Undefined index: bp-message in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core.php on line 1303 Notice: Undefined index: bp-message-type in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core.php on line 1306 Notice: Undefined property: stdClass::$is_directory in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-templatetags.php on line 869 Notice: Undefined property: stdClass::$is_directory in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-templatetags.php on line 869 Notice: Undefined property: stdClass::$is_directory in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-templatetags.php on line 869 Notice: Undefined property: stdClass::$is_directory in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-templatetags.php on line 1072 Notice: Undefined property: stdClass::$is_directory in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-templatetags.php on line 869 Notice: Undefined property: stdClass::$is_directory in /Users/kristen/Sites/testing/wp-content/plugins/buddypress/bp-core/bp-core-templatetags.php on line 869
Attachments (7)
Change History (25)
#3
@
14 years ago
- Component set to Activity
- Keywords has-patch needs-testing added
Hi,
With the sole purpose of being able to see my own errors - I went through the buddy press core and corrected (or unintentionally hid) the errors I encountered - at least in the admin and superficially browsing around the public pages.
IMO this is not a minor bug. Generating an error is not free (i.e. Buddy press would perform faster if it didn't generate so many errors) and it makes it pretty difficult to contribute/write plugins if your own mistakes get drowned in the noise.
Rather than correct the error messages (as I have done) it would be better to correct the reasons they exist in the first place which in most cases comes from using uninitialized/undefined class variables.
I'm not that familiar with buddy press (or wordpress for that matter) so I hope this patch is useful. It's not complete - applying (only) my patch should not close this ticket.
Regards,
AD
#5
@
14 years ago
- Milestone changed from Future Release to 1.2.4
Can we try to look at this sort of thing for the 1.2.4 release?
#7
@
14 years ago
- Milestone changed from 1.2.4 to 1.3
This patch is now quite out of date with the current branch.
I spent a few hours today trying to get it to apply and bug test getting BP to play nicely with WP_DEBUG, but I think it's more work than we can fit into a point release.
Bumping to 1.3 unless someone wants to take a crack at getting this patch to apply to current branch.
#10
@
14 years ago
The function _c() was deprecated in WP 2.9. It's recommended replacement is _x().
#11
@
14 years ago
The function attribute_escape() has been deprecated since WP 2.8. It's recommended replacement is clean_url().
#12
@
14 years ago
Correction (RE: Comment 11):
The recommended replacement for attribute_escape() is esc_attr() not, clean_url().
#13
@
14 years ago
The function clean_url() is deprecated as of WP 3.0. It's recommended replacement is esc_url().
#14
@
14 years ago
Make sure the constants 'BP_XPROFILE_BASE_GROUP_NAME' and 'BP_XPROFILE_FULLNAME_FIELD_NAME' aren't already defined.
#15
@
14 years ago
- Summary changed from Notices revealed with WP_DEBUG to [patch] Notices revealed with WP_DEBUG
#16
@
14 years ago
- Priority changed from minor to major
I've not tried to see if this patch will still apply cleanly to trunk, but we certainly need to remove as many notices as possible in the time we have before 1.3.
Correct warnings