WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#13517 closed defect (bug) (fixed)

Undefined variable $recurse_start when creating a new menu

Reported by: ocean90 Owned by: wpmuguru
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Multisite Keywords: menu
Focuses: Cc:

Description

Multisite, global terms enabled.

Notice: Undefined variable: recurse_start in H:\xampplite\htdocs\wp\wp-includes\ms-functions.php  on line 1260

I get this message when I create a new menu. Maybe use isset() or set $recurse_start by default true/false.

Change History (6)

#1 @nacin
6 years ago

  • Owner changed from nacin to wpmuguru
  • Status changed from new to assigned

Not sure if recurse_start should be true or false by default. Alternative is to add an isset check. Assigning to Ron for review and commit.

#2 follow-up: @nacin
6 years ago

I'm not really sure what's going on with the logic there at all. What happens when $global_terms_recurse is greater than 10?

Also, we can make that a static variable instead of a global variable.

#3 in reply to: ↑ 2 @wpmuguru
6 years ago

I'm having a look at this now.

Replying to nacin:

I'm not really sure what's going on with the logic there at all. What happens when $global_terms_recurse is greater than 10?

Also, we can make that a static variable instead of a global variable.

The 10 is a limit to prevent a race condition. If it hits 10 conflicts between local terms and global terms, it stops trying to sync.

#4 @wpmuguru
6 years ago

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

(In [14866]) eliminate warning in global_terms(), global to static, fixes #13517

#5 @wpmuguru
6 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

have to apply another patch to this.

#6 @wpmuguru
6 years ago

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

(In [14867]) give static var initial value, fixes #13517

Note: See TracTickets for help on using tickets.