Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#29123 closed defect (bug) (fixed)

Undefined index within testcase.php _restore_hooks()

Reported by: kevinlangleyjr's profile kevinlangleyjr Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Build/Test Tools Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Due to the change made here, [29251] to backup and restore these global variables, all unit tests are failing for me with Undefined index: merged_filters . By adding a check on line 101 to check if the value exists within the self::$hooks_saved would prevent this error from occurring.

Here is an example of the phpunit output there.

Attachments (1)

testcase.php.patch (179 bytes) - added by kevinlangleyjr 10 years ago.

Download all attachments as: .zip

Change History (7)

#1 @TobiasBg
10 years ago

Possible related: #28986

#2 @SergeyBiryukov
10 years ago

  • Description modified (diff)

#3 @helen
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

[29251] was reverted. Feel free to re-open if this is still an issue.

#4 @SergeyBiryukov
10 years ago

  • Milestone set to Awaiting Review
  • Resolution invalid deleted
  • Status changed from closed to reopened

[29251] was not reverted, [29267] was (in [29274]).

Last edited 10 years ago by SergeyBiryukov (previous) (diff)

#5 @SergeyBiryukov
10 years ago

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

In 29503:

Avoid undefined index notices in WP_UnitTestCase::_restore_hooks().

props kevinlangleyjr.
fixes #29123.

#6 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.0
Note: See TracTickets for help on using tickets.