Make WordPress Core

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#9392 closed defect (bug) (worksforme)

PHP notices in "Right Now" dashboard widget

Reported by: Viper007Bond Owned by:
Milestone: Priority: lowest
Severity: minor Version: 2.8
Component: Warnings/Notices Keywords: has-patch
Focuses: Cc:


Some notices show up for me on the dashboard in the "Right Now" widget. Attached patch fixes them and since the code looked ugly as hell with the isset() tests, I spaced it out to make it easier to read.

Attachments (2)

9392.patch (2.5 KB) - added by Viper007Bond 9 years ago.
9392.2.patch (1.7 KB) - added by hakre 8 years ago.

Download all attachments as: .zip

Change History (18)

9 years ago

#1 @Denis-de-Bernardy
9 years ago

maybe we should fix get_current_theme() instead

#2 @Denis-de-Bernardy
9 years ago

  • Component changed from Administration to Warnings/Notices
  • Owner anonymous deleted

#3 @ryan
9 years ago

Fixing get_current_theme() sounds good.

#4 @Denis-de-Bernardy
9 years ago

  • Keywords needs-patch added; has-patch removed

#5 follow-up: @hakre
9 years ago

see #9393. duplicate?

#6 @Denis-de-Bernardy
9 years ago

Haven't read, but they're consecutive tickets that Viper both reported, so I'd leave this one open.

#7 in reply to: ↑ 5 @Viper007Bond
9 years ago

Replying to hakre:

see #9393. duplicate?

Someone else may have added a patch to #9393 for this issue, but I opened that ticket a while after I opened this ticket as I found more notices and figured a single, generic notice ticket would be better than lots of tickets.

#8 @Denis-de-Bernardy
9 years ago

  • Milestone changed from 2.8 to 2.9

Punting per discussion during the WP meet-up...

#9 @ryan
9 years ago

  • Milestone changed from 2.9 to Future Release

#10 @westi
9 years ago

  • Cc westi added
  • Keywords reporter-feedback added

Testing this on 3.0-alpha with WP_DEBUG enabled and a number of different themes I don't see and notices.

Do I need a particular theme to reproduce this issue or is it just fixed?

8 years ago

#11 @hakre
8 years ago

Reviewed, I do not get notices any longer as well in trunk.

While doing the review I did fidle with the bits a bit. That function should return by reference because it's handling over an object to get this PHP 4 safe.

#12 @hakre
8 years ago

  • Keywords has-patch dev-feedback added; needs-patch removed

#13 @Denis-de-Bernardy
8 years ago

  • Keywords commit added; reporter-feedback dev-feedback removed
  • Milestone changed from Future Release to 3.0

I like it. It cleans things up without changing the slightest bit of functionality, and it fixes the notices. Definitely needs committer review.

#14 @westi
8 years ago

  • Keywords commit removed
  • Resolution set to worksforme
  • Status changed from new to closed

The patch is pointless as far as I can see.

There are no notices.

I tested with a worse case style.css:

Theme Name: Bad theme
Template: default

I get no notices and checking the return from get_themes() all those array elements are setup for all themes.

Closing as Works for Me.

#15 @westi
8 years ago

  • Milestone 3.0 deleted

#16 @Viper007Bond
8 years ago

Something must have changed since I reported this as I assure you I wasn't imagining things at the time. :)

Note: See TracTickets for help on using tickets.