Opened 15 years ago
Closed 14 years ago
#2247 closed defect (bug) (fixed)
[patch] bp_core_set_uri_globals() doesn't properly return on WP page
Reported by: | cnorris23 | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | Version: | ||
Component: | Core | Keywords: | has-patch |
Cc: |
Description
The function, bp_core_set_uri_globals()
is set to return false, if you're on a WP page starting at line 122 of bp-catch-uri.php.
/* This is not a BuddyPress page, so just return. */ if ( in_array( 0, (array) $matches ) ) return false;
However, the function can never return false, as $matches
is unset in the preceding foreach statement if there is no match to a BP page.
Attachments (3)
Change History (9)
#2
@
15 years ago
Some changes have taken place to this function that should stop this from happening.
Can you try out the latest branch of code and see if it's fixed for you now? The code in your patch actually no longer exists in the 1.2 branch of code.
#3
@
15 years ago
It's still an issue for trunk, as of [2899]. In fact the exact same code is in both the 1.2 branch, and trunk. They're even on the same line ;). I was in the process of trying to make patches to clean up all the errors in WP_DEBUG when I came across this. I'm not trying to do anything that requires the fix, so this can be bumped to 1.3. Fixing this stops the function from unnecessarily running it's course, and helps to cut down on some undefined variable
WP_DEBUG messages.
#4
@
14 years ago
- Milestone changed from 1.2.4 to 1.3
Bumping to 1.3 as code does not exist in branch, and this function is changing for 1.3 in trunk, since root components are being deprecated in lieu of page templates.
Yep, past my bedtime :/. The first patch was crap, and should have never been posted. It can be ignored.