Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#4047 closed defect (bug) (fixed)

pointless use of preg_match in get_plugins()

Reported by: m0n5t3r Owned by: rob1n
Milestone: 2.2 Priority: low
Severity: normal Version:
Component: Optimization Keywords:
Focuses: Cc:


... patch attached

Attachments (2)

get_plugins_no_preg_match.diff (1010 bytes) - added by m0n5t3r 13 years ago.
4047.diff (1.0 KB) - added by rob1n 13 years ago.

Download all attachments as: .zip

Change History (7)

#1 @rob1n
13 years ago

  • Component changed from Administration to Optimization
  • Keywords has-patch removed
  • Milestone changed from 2.3 to 2.2
  • Owner changed from anonymous to rob1n
  • Status changed from new to assigned

The point of the preg_match is to grab any filename that STARTS with ".". New patch coming up. But I agree -- pointless use of preg_match. WP's code has quite a few of those :\.

#2 @rob1n
13 years ago

Sorry, I'm mistaken. That just matches ., .. or ......... I think we should omit directories that start with ., though. Such as .svn, etc.

13 years ago

#3 @rob1n
13 years ago

  • Status changed from assigned to new

#4 @markjaquith
13 years ago

+1 to rob1n's patch

#5 @rob1n
13 years ago

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

(In [5152]) Take out useless preg_match()'s and ignore directories starting with ".". Props m0n5t3r. fixes #4047

Note: See TracTickets for help on using tickets.