From: Max Semenik Date: Wed, 10 Feb 2016 22:11:30 +0000 (-0800) Subject: Fix a bunch of call-time pass-by-reference errors X-Git-Tag: 1.31.0-rc.0~7978^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=415953d91e1acbddace8b761b218cf2f78d6a974;p=lhc%2Fweb%2Fwiklou.git Fix a bunch of call-time pass-by-reference errors Change-Id: I3bd8e7c4d2dca465957a353cb7dc2a906699ff6a --- diff --git a/maintenance/backup.inc b/maintenance/backup.inc index 9af96043c9..1306ae657e 100644 --- a/maintenance/backup.inc +++ b/maintenance/backup.inc @@ -138,7 +138,7 @@ class BackupDumper extends Maintenance { require_once $file; } $register = array( $class, 'register' ); - call_user_func_array( $register, array( &$this ) ); + call_user_func_array( $register, array( $this ) ); } function execute() { diff --git a/maintenance/cleanupTitles.php b/maintenance/cleanupTitles.php index 574d5bdd4c..1277e83da7 100644 --- a/maintenance/cleanupTitles.php +++ b/maintenance/cleanupTitles.php @@ -90,7 +90,7 @@ class TitleCleanup extends TableCleanup { protected function moveIllegalPage( $row ) { $legal = 'A-Za-z0-9_/\\\\-'; $legalized = preg_replace_callback( "!([^$legal])!", - array( &$this, 'hexChar' ), + array( $this, 'hexChar' ), $row->page_title ); if ( $legalized == '.' ) { $legalized = '(dot)'; diff --git a/maintenance/dumpIterator.php b/maintenance/dumpIterator.php index eef535adf3..0f39513fa0 100644 --- a/maintenance/dumpIterator.php +++ b/maintenance/dumpIterator.php @@ -76,7 +76,7 @@ abstract class DumpIterator extends Maintenance { $importer = new WikiImporter( $source, $this->getConfig() ); $importer->setRevisionCallback( - array( &$this, 'handleRevision' ) ); + array( $this, 'handleRevision' ) ); $this->from = $this->getOption( 'from', null ); $this->count = 0; diff --git a/maintenance/dumpTextPass.php b/maintenance/dumpTextPass.php index 8169ef5429..12ccd0e0ae 100644 --- a/maintenance/dumpTextPass.php +++ b/maintenance/dumpTextPass.php @@ -426,10 +426,10 @@ TEXT xml_set_element_handler( $parser, - array( &$this, 'startElement' ), - array( &$this, 'endElement' ) + array( $this, 'startElement' ), + array( $this, 'endElement' ) ); - xml_set_character_data_handler( $parser, array( &$this, 'characterData' ) ); + xml_set_character_data_handler( $parser, array( $this, 'characterData' ) ); $offset = 0; // for context extraction on error reporting do { diff --git a/maintenance/importDump.php b/maintenance/importDump.php index 7c452a6325..3bf8b272ff 100644 --- a/maintenance/importDump.php +++ b/maintenance/importDump.php @@ -297,13 +297,13 @@ TEXT return false; } } - $importer->setPageCallback( array( &$this, 'reportPage' ) ); + $importer->setPageCallback( array( $this, 'reportPage' ) ); $this->importCallback = $importer->setRevisionCallback( - array( &$this, 'handleRevision' ) ); + array( $this, 'handleRevision' ) ); $this->uploadCallback = $importer->setUploadCallback( - array( &$this, 'handleUpload' ) ); + array( $this, 'handleUpload' ) ); $this->logItemCallback = $importer->setLogItemCallback( - array( &$this, 'handleLogItem' ) ); + array( $this, 'handleLogItem' ) ); if ( $this->uploads ) { $importer->setImportUploads( true ); } diff --git a/maintenance/renderDump.php b/maintenance/renderDump.php index 09b1b1c1ea..33d6e50c83 100644 --- a/maintenance/renderDump.php +++ b/maintenance/renderDump.php @@ -65,7 +65,7 @@ class DumpRenderer extends Maintenance { $importer = new WikiImporter( $source, $this->getConfig() ); $importer->setRevisionCallback( - array( &$this, 'handleRevision' ) ); + array( $this, 'handleRevision' ) ); $importer->doImport(); diff --git a/maintenance/storage/checkStorage.php b/maintenance/storage/checkStorage.php index c0f6c7b6fa..95e3ca7295 100644 --- a/maintenance/storage/checkStorage.php +++ b/maintenance/storage/checkStorage.php @@ -471,7 +471,7 @@ class CheckStorage { $source, ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) ); - $importer->setRevisionCallback( array( &$this, 'importRevision' ) ); + $importer->setRevisionCallback( array( $this, 'importRevision' ) ); $importer->doImport(); }