Make WordPress Core

Opened 6 years ago

Closed 6 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:


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 6 years ago.

Download all attachments as: .zip

Change History (6)

6 years ago

#1 @nacin
6 years ago

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

#3 @nacin
6 years ago

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

#4 @nacin
6 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

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

#5 @nacin
6 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.