r94749 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94748‎ | r94749 | r94750 >
Date:12:35, 17 August 2011
Author:catrope
Status:ok (Comments)
Tags:
Comment:
Followup r94674: using 'self::foo' as a callback doesn't work in PHP 5.2 (which runs on WMF), use array( __CLASS__, 'foo' ) instead
Modified paths:
  • /trunk/extensions/WikimediaIncubator/IncubatorTest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikimediaIncubator/IncubatorTest.php
@@ -114,10 +114,10 @@
115115 }
116116 }
117117 global $wmincProjects, $wmincSisterProjects;
118 - $listProjects = array_map( 'self::preg_quote_slash', array_keys( $wmincProjects ) );
 118+ $listProjects = array_map( array( __CLASS__, 'preg_quote_slash' ), array_keys( $wmincProjects ) );
119119 if( $allowSister && is_array( $wmincSisterProjects ) ) {
120120 # join the project codes with those of the sister projects
121 - $listSister = array_map( 'self::preg_quote_slash', array_keys( $wmincSisterProjects ) );
 121+ $listSister = array_map( array( __CLASS__, 'preg_quote_slash' ), array_keys( $wmincSisterProjects ) );
122122 $listProjects = array_merge( $listProjects, $listSister );
123123 }
124124 $listProjects = implode( '|', $listProjects );
@@ -283,7 +283,7 @@
284284 global $wmincTestWikiNamespaces, $wmincProjectSite, $wmincPseudoCategoryNSes;
285285 $prefixdata = self::analyzePrefix( $title->getText() );
286286 $ns = $title->getNamespace();
287 - $categories = array_map( 'self::preg_quote_slash', $wmincPseudoCategoryNSes );
 287+ $categories = array_map( array( __CLASS__, 'preg_quote_slash' ), $wmincPseudoCategoryNSes );
288288 if( !$prefixdata['error'] ) {
289289 # no error in prefix -> no error to show
290290 return false;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94674Use slash as second paramter for preg_quote(), per CR on r94482robin18:41, 16 August 2011

Comments

#Comment by SPQRobin (talk | contribs)   23:04, 17 August 2011

Didn't know. Thanks.

Status & tagging log