r77803 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77802‎ | r77803 | r77804 >
Date:15:06, 5 December 2010
Author:platonides
Status:deferred
Tags:
Comment:
Follow up r77802

PHP Deprecated: Call-time pass-by-reference has been deprecated in ./tools/commonsapi/commonsapi.php on line 167
PHP Deprecated: Call-time pass-by-reference has been deprecated in ./tools/commonsapi/commonsapi.php on line 323
PHP Deprecated: Call-time pass-by-reference has been deprecated in ./tools/commonsapi/commonsapi.php on line 369
PHP Deprecated: Call-time pass-by-reference has been deprecated in ./tools/commonsapi/commonsapi.php on line 419
PHP Deprecated: Call-time pass-by-reference has been deprecated in ./tools/commonsapi/commonsapi.php on line 423
PHP Deprecated: Call-time pass-by-reference has been deprecated in ./tools/commonsapi/commonsapi.php on line 431
Modified paths:
  • /trunk/tools/commonsapi/commonsapi.php (modified) (history)

Diff [purge]

Index: trunk/tools/commonsapi/commonsapi.php
@@ -141,7 +141,7 @@
142142 foreach ( $matches AS $m ) {
143143 $t = array_pop ( explode ( $m , $text , 2 ) ) ;
144144 $title = array () ;
145 - preg_match ( '/\s+title="[^"]*"/' , $t , &$title ) ;
 145+ preg_match ( '/\s+title="[^"]*"/' , $t , $title ) ;
146146 $title = $title[0] ;
147147 $title = array_pop ( explode ( 'title="' , $title , 2 ) ) ;
148148 $title = substr ( $title , 0 , -1 ) ;
@@ -164,7 +164,7 @@
165165 function try_fileinfo_template ( $text ) {
166166 global $titles ;
167167 $matches = array () ;
168 - preg_match_all ( '/th[^>]+id="fileinfotpl_[^"]+"/' , $text , &$matches ) ;
 168+ preg_match_all ( '/th[^>]+id="fileinfotpl_[^"]+"/' , $text , $matches ) ;
169169 $matches = $matches[0] ;
170170
171171 if ( count ( $matches ) == 0 ) return false ;
@@ -320,7 +320,7 @@
321321 // Detect descriptions in many languages
322322 $language_names = array () ;
323323 $matches = array () ;
324 -preg_match_all ( '/div\s+class="description [a-z-]+"/' , $text , &$matches ) ;
 324+preg_match_all ( '/div\s+class="description [a-z-]+"/' , $text , $matches ) ;
325325 $matches = $matches[0] ;
326326 foreach ( $matches AS $m ) {
327327 $tx = explode ( $m , $text ) ;
@@ -366,7 +366,7 @@
367367 // Categories
368368 $self_made = '' ;
369369 $cats = array () ;
370 -preg_match_all ( '/ title="Category:[^"]+"\s*>/' , $text , &$matches ) ;
 370+preg_match_all ( '/ title="Category:[^"]+"\s*>/' , $text , $matches ) ;
371371 $matches = $matches[0] ;
372372 foreach ( $matches AS $m ) {
373373 $m = array_pop ( explode ( ':' , $m , 2 ) ) ;
@@ -416,11 +416,11 @@
417417 $lat = '' ;
418418 $lon = '' ;
419419 $matches = array () ;
420 -preg_match_all ( '/<span\s+class="latitude">([0-9\.]+)<\/span>([^<]*)/' , $text , &$matches ) ;
 420+preg_match_all ( '/<span\s+class="latitude">([0-9\.]+)<\/span>([^<]*)/' , $text , $matches ) ;
421421 if ( count ( $matches ) == 3 ) {
422422 $lat = $matches[1][0] . $matches[2][0] ;
423423 $matches = array () ;
424 - preg_match_all ( '/<span\s+class="longitude">([0-9\.]+)<\/span>([^<]*)/' , $text , &$matches ) ;
 424+ preg_match_all ( '/<span\s+class="longitude">([0-9\.]+)<\/span>([^<]*)/' , $text , $matches ) ;
425425 if ( count ( $matches ) == 3 ) {
426426 $lon = $matches[1][0] . $matches[2][0] ;
427427 }
@@ -428,7 +428,7 @@
429429
430430 if ( $lat . $lon == '' ) {
431431 $matches = array () ;
432 - preg_match_all ( '/<span\s+class="geo"[^>]*>([\-0-9\.]+)\s*;\s*([\-0-9\.]+)<\/span>/' , $text , &$matches ) ;
 432+ preg_match_all ( '/<span\s+class="geo"[^>]*>([\-0-9\.]+)\s*;\s*([\-0-9\.]+)<\/span>/' , $text , $matches ) ;
433433 if ( count ( $matches ) == 3 ) {
434434 $lat = $matches[1][0] ;
435435 $lon = $matches[2][0] ;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77802Fix PHP Deprecated: Call-time pass-by-reference has been deprecated in ./too...platonides15:05, 5 December 2010

Status & tagging log