Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#9392 closed defect (bug) (worksforme)

PHP notices in "Right Now" dashboard widget

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

Description

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 17 years ago.
9392.2.patch (1.7 KB ) - added by hakre 17 years ago.

Download all attachments as: .zip

Change History (18)

@Viper007Bond
17 years ago

#1 @Denis-de-Bernardy
17 years ago

maybe we should fix get_current_theme() instead

#2 @Denis-de-Bernardy
17 years ago

  • Component AdministrationWarnings/Notices
  • Owner anonymous removed

#3 @ryan
17 years ago

Fixing get_current_theme() sounds good.

#4 @Denis-de-Bernardy
17 years ago

  • Keywords needs-patch added; has-patch removed

#5 follow-up: @hakre
17 years ago

see #9393. duplicate?

#6 @Denis-de-Bernardy
17 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
17 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
17 years ago

  • Milestone 2.82.9

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

#9 @ryan
17 years ago

  • Milestone 2.9Future Release

#10 @westi
17 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?

@hakre
17 years ago

#11 @hakre
17 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
17 years ago

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

#13 @Denis-de-Bernardy
17 years ago

  • Keywords commit added; reporter-feedback dev-feedback removed
  • Milestone Future Release3.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
17 years ago

  • Keywords commit removed
  • Resolutionworksforme
  • Status newclosed

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
17 years ago

  • Milestone 3.0

#16 @Viper007Bond
17 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.