WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#12144 closed defect (bug) (fixed)

Notices during install caused by get_transient() and made worse by wp_rand()

Reported by: nacin Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Optimization Keywords: has-patch
Focuses: Cc:

Description

During install, I saw about 75 of these:

Notice: Undefined variable: transient_option in C:\xampp\htdocs\ms\wp-includes\functions.php on line 690

This due to the way get_transient() doesn't properly handle WP_INSTALLING. Additionally, the errors multiplied because we fetch a transient in wp_rand() every time but may not always need it.

Patch fixes get_transient() and optimizes wp_rand().

Attachments (1)

12144.diff (2.0 KB) - added by nacin 4 years ago.

Download all attachments as: .zip

Change History (6)

nacin4 years ago

comment:1 nacin4 years ago

Apparently this was caused by [12973], which I think deserves a closer look.

comment:3 nacin4 years ago

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

comment:4 nacin4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening, I still want to make the wp_rand() change.

comment:5 nacin4 years ago

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

(In [13080]) Optimize wp_rand(), only check transient when needed. Fixes #12144.

Note: See TracTickets for help on using tickets.