Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#31287 closed defect (bug) (fixed)

Use require_once for loading class WP_Admin_Bar

Reported by: danielbachhuber's profile danielbachhuber Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.2 Priority: normal
Severity: normal Version:
Component: Toolbar Keywords: has-patch
Focuses: Cc:

Description

Prevent fatals if _wp_admin_bar_init() is called twice

Attachments (1)

31287.1.diff (451 bytes) - added by danielbachhuber 10 years ago.

Download all attachments as: .zip

Change History (5)

#1 @danielbachhuber
10 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
10 years ago

Why would _wp_admin_bar_init() be called twice?

#3 @danielbachhuber
10 years ago

Integration tests for my use case. But there's existing prior art for switching from require to require_once

#4 @SergeyBiryukov
10 years ago

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

In 31411:

Use require_once() to prevent a fatal error if _wp_admin_bar_init() is called twice.

props danielbachhuber.
fixes #31287.

Note: See TracTickets for help on using tickets.