Make WordPress Core

Opened 7 years ago

Closed 6 years ago

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

Download all attachments as: .zip

Change History (18)

@Viper007Bond7 years ago

comment:1 @Denis-de-Bernardy6 years ago

maybe we should fix get_current_theme() instead

comment:2 @Denis-de-Bernardy6 years ago

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

comment:3 @ryan6 years ago

Fixing get_current_theme() sounds good.

comment:4 @Denis-de-Bernardy6 years ago

  • Keywords needs-patch added; has-patch removed

comment:5 follow-up: @hakre6 years ago

see #9393. duplicate?

comment:6 @Denis-de-Bernardy6 years ago

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

comment:7 in reply to: ↑ 5 @Viper007Bond6 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.

comment:8 @Denis-de-Bernardy6 years ago

  • Milestone changed from 2.8 to 2.9

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

comment:9 @ryan6 years ago

  • Milestone changed from 2.9 to Future Release

comment:10 @westi6 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?

@hakre6 years ago

comment:11 @hakre6 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.

comment:12 @hakre6 years ago

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

comment:13 @Denis-de-Bernardy6 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.

comment:14 @westi6 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.

comment:15 @westi6 years ago

  • Milestone 3.0 deleted

comment:16 @Viper007Bond6 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.