Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#20576 closed defect (bug) (wontfix)

WP Scripts: Array key isset check

Reported by: bigdawggi's profile bigdawggi Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

Small patch for making sure the array key is set, before doing logic against it. Other plugins' code was generating a PHP Notice here, but this cleans up WP code to not throw PHP notice if some other plugin does something poorly.

Attachments (1)

wp-scripts-notice-fix.diff (513 bytes) - added by bigdawggi 13 years ago.

Download all attachments as: .zip

Change History (5)

#1 @azaozz
13 years ago

If that array key doesn't exist there probably are much bigger problems than a PHP notice. Not sure if it's worth it removing the notice as it would indicate that something is misusing WP_Scripts.

#2 @nacin
13 years ago

  • Keywords reporter-feedback added

I would tend to agree. Hiding notices like these just makes it difficult for developers to debug their code. I think the notice is proper here.

#3 @bigdawggi
13 years ago

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

With those points, I can see the case for keeping the notice. There's a reason notices exist ;) Setting to "wontfix", feel free to re-open if necessary.

#4 @helenyhou
13 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.