Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#29077 closed defect (bug) (fixed)

Undefined index notice in wp_reschedule_event()

Reported by: SergeyBiryukov Owned by: SergeyBiryukov
Priority: normal Milestone: 4.0
Component: Cron API Version:
Severity: normal Keywords: good-first-bug has-patch
Cc: Focuses:

Description

Previously: #22268

If you have a custom cron schedule defined by a plugin, and a recurring event attached to it, you'll get a notice if the plugin is no longer available:

PHP Notice: Undefined index: minutely in wp-includes/cron.php on line 111

The notice comes from wp_reschedule_event(): tags/3.9.1/src/wp-includes/cron.php#L92​.

In line 110, we should replace redundant 0 == $interval check with isset( $schedules[ $recurrence ] ).

Attachments (2)

29077.patch​ (1019 bytes ) - added by paulschreiber 12 years ago.
29077.2.patch​ (1007 bytes ) - added by paulschreiber 12 years ago.
patch with correct indentation

Download all attachments as: .zip

Change History (5)

#1 @paulschreiber
12 years ago

  • Keywords has-patch added; needs-patch removed

@paulschreiber
12 years ago

patch with correct indentation

#2 @SergeyBiryukov
12 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 29349:

Avoid an undefined index notice in wp_reschedule_event().

props paulschreiber.
fixes #29077.

#3 @SergeyBiryukov
12 years ago

  • Milestone Awaiting Review → 4.0
Note: See TracTickets for help on using tickets.