Umherirrender has uploaded a new change for review.
https://gerrit.wikimedia.org/r/62999
Change subject: print is not a function
......................................................................
print is not a function
Removed parenthesis after print
Change-Id: I1343872de7aa7c64952a3d86a63aaa091e46bda3
---
M includes/Import.php
M includes/OutputPage.php
M includes/db/DatabaseMssql.php
M maintenance/Maintenance.php
M maintenance/language/checkDupeMessages.php
M tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
M tests/phpunit/includes/api/query/ApiQueryTestBase.php
7 files changed, 19 insertions(+), 19 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/99/62999/1
diff --git a/includes/Import.php b/includes/Import.php
index 7b078db..8b7af02 100644
--- a/includes/Import.php
+++ b/includes/Import.php
@@ -428,11 +428,11 @@
}
}
- print( var_dump(
+ print var_dump(
$lookup[$this->reader->nodeType],
$this->reader->name,
$this->reader->value
- ) . "\n\n" );
+ ) . "\n\n";
}
/**
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 4a2b17a..746cd0e 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -2076,7 +2076,7 @@
}
/**
- * Actually output something with print().
+ * Actually output something with print.
*
* @param string $ins the string to output
*/
diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php
index 293557f..130ac70 100644
--- a/includes/db/DatabaseMssql.php
+++ b/includes/db/DatabaseMssql.php
@@ -674,7 +674,7 @@
$res = sqlsrv_query( $this->mConn, "SELECT * FROM
information_schema.tables
WHERE table_type='BASE TABLE' AND table_name =
'$table'" );
if ( $res === false ) {
- print( "Error in tableExists query: " .
$this->getErrors() );
+ print "Error in tableExists query: " .
$this->getErrors();
return false;
}
if ( sqlsrv_fetch( $res ) ) {
@@ -693,7 +693,7 @@
$res = sqlsrv_query( $this->mConn, "SELECT DATA_TYPE FROM
INFORMATION_SCHEMA.Columns
WHERE TABLE_NAME = '$table' AND COLUMN_NAME = '$field'"
);
if ( $res === false ) {
- print( "Error in fieldExists query: " .
$this->getErrors() );
+ print "Error in fieldExists query: " .
$this->getErrors();
return false;
}
if ( sqlsrv_fetch( $res ) ) {
@@ -708,7 +708,7 @@
$res = sqlsrv_query( $this->mConn, "SELECT * FROM
INFORMATION_SCHEMA.Columns
WHERE TABLE_NAME = '$table' AND COLUMN_NAME = '$field'"
);
if ( $res === false ) {
- print( "Error in fieldInfo query: " .
$this->getErrors() );
+ print "Error in fieldInfo query: " . $this->getErrors();
return false;
}
$meta = $this->fetchRow( $res );
diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php
index 2162869..94f9402 100644
--- a/maintenance/Maintenance.php
+++ b/maintenance/Maintenance.php
@@ -327,7 +327,7 @@
}
if ( $channel === null ) {
$this->cleanupChanneled();
- print( $out );
+ print $out;
} else {
$out = preg_replace( '/\n\z/', '', $out );
$this->outputChanneled( $out, $channel );
diff --git a/maintenance/language/checkDupeMessages.php
b/maintenance/language/checkDupeMessages.php
index 55e34be..190b237 100644
--- a/maintenance/language/checkDupeMessages.php
+++ b/maintenance/language/checkDupeMessages.php
@@ -95,22 +95,22 @@
if ( ( $messageExist ) && ( $messageCExist ) ) {
if ( !strcmp( $runMode, 'php' ) ) {
- print( "<?php\n" );
- print( '$dupeMessages = array(' . "\n" );
+ print "<?php\n";
+ print '$dupeMessages = array(' . "\n";
}
foreach ( $wgMessages[$langCodeC] as $key => $value ) {
foreach ( $wgMessages[$langCode] as $ckey => $cvalue ) {
if ( !strcmp( $key, $ckey ) ) {
if ( ( !strcmp( $key, $ckey ) ) && (
!strcmp( $value, $cvalue ) ) ) {
if ( !strcmp( $runMode, 'raw' )
) {
- print( "$key\n" );
+ print "$key\n";
} elseif ( !strcmp( $runMode,
'php' ) ) {
- print( "'$key' =>
'',\n" );
+ print "'$key' => '',\n";
} elseif ( !strcmp( $runMode,
'wiki' ) ) {
$uKey = ucfirst( $key );
- print( "*
MediaWiki:$uKey/$langCode\n" );
+ print "*
MediaWiki:$uKey/$langCode\n";
} else {
- print( "* $key\n" );
+ print "* $key\n";
}
$count++;
}
@@ -118,7 +118,7 @@
}
}
if ( !strcmp( $runMode, 'php' ) ) {
- print( ");\n" );
+ print ");\n";
}
if ( !strcmp( $runMode, 'text' ) ) {
if ( $count == 1 ) {
diff --git a/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
b/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
index 0acbe9f..fbb1e64 100644
--- a/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
+++ b/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
@@ -75,7 +75,7 @@
//$reqStr = str_replace( '&', ' & ', $reqStr );
$this->assertLessThan( $expectedCount, $count, "$id
more data: $reqStr" );
if ( $this->mVerbose ) {
- print ( "$id (#$count): $reqStr\n" );
+ print "$id (#$count): $reqStr\n";
}
try {
$data = $this->doApiRequest( $request );
@@ -145,7 +145,7 @@
self::GetItems( $q, 'allpages', 'Pages', $print );
self::GetItems( $q, 'alllinks', 'Links', $print );
self::GetItems( $q, 'alltransclusions', 'Trnscl', $print );
- print( ' ' . implode( ' ', $print ) . "\n" );
+ print ' ' . implode( ' ', $print ) . "\n";
}
private static function GetItems( $q, $moduleName, $name, &$print ) {
diff --git a/tests/phpunit/includes/api/query/ApiQueryTestBase.php
b/tests/phpunit/includes/api/query/ApiQueryTestBase.php
index d712bc0..8ee8ea9 100644
--- a/tests/phpunit/includes/api/query/ApiQueryTestBase.php
+++ b/tests/phpunit/includes/api/query/ApiQueryTestBase.php
@@ -109,10 +109,10 @@
if ( is_array( $message ) ) {
$message = http_build_query( $message );
}
- print( "\nRequest: $message\n" );
- print( "\nExpected:\n" );
+ print "\nRequest: $message\n";
+ print "\nExpected:\n";
print_r( $exp );
- print( "\nResult:\n" );
+ print "\nResult:\n";
print_r( $result );
throw $e; // rethrow it
}
--
To view, visit https://gerrit.wikimedia.org/r/62999
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1343872de7aa7c64952a3d86a63aaa091e46bda3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits