Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 2 years ago

#6021 closed enhancement (invalid)

Use the "@" modifier sparingly (or not at all).

Reported by: orlandu63 Owned by: jacobsantos
Priority: lowest Milestone:
Component: Optimization Version: 2.3.3
Severity: trivial Keywords:
Cc: Focuses:

Description

The "@" error-control operator should be avoided. It is slow.

In /wp-includes/script-loader.php you can use array_pad(func_get_args(), 4, null) to achieve the same effect (and save a few CPU cycles). I just noticed this while browsing recent changesets, so I'm sure there are more potential @-replacements out there.

Change History (5)

#1 @orlandu63
18 years ago

  • Milestone 2.3.42.7
  • Version2.3.3

#2 @orlandu63
18 years ago

  • Milestone 2.72.6

#3 @anonymized_218323
18 years ago

  • Owner changed from anonymous to jacobsantos

#4 @jacobsantos
18 years ago

  • Milestone 2.9
  • Resolutioninvalid
  • Status newclosed

It is difficult to go through and correct all of the instances where '@' is used, because sometimes it is used to prevent warnings that can't be checked before hand.

#5 @jacobsantos
18 years ago

It is better to be safe than sorry when it comes to accidentally displaying warnings and notices for blogs that don't want it.

Note: See TracTickets for help on using tickets.