Skip to:
Content

BuddyPress.org

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's profile 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)

2247.diff (777 bytes) - added by cnorris23 15 years ago.
2247.2.diff (522 bytes) - added by cnorris23 15 years ago.
2247.003.diff (393 bytes) - added by cnorris23 15 years ago.
updated for trunk

Download all attachments as: .zip

Change History (9)

@cnorris23
15 years ago

@cnorris23
15 years ago

#1 @cnorris23
15 years ago

Yep, past my bedtime :/. The first patch was crap, and should have never been posted. It can be ignored.

#2 @johnjamesjacoby
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 @cnorris23
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.

@cnorris23
15 years ago

updated for trunk

#4 @johnjamesjacoby
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.

#5 @paulhastings0
14 years ago

  • Summary changed from bp_core_set_uri_globals() doesn't properly return on WP page to [patch] bp_core_set_uri_globals() doesn't properly return on WP page

#6 @djpaul
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3324]) Fixes #2247

Note: See TracTickets for help on using tickets.