print is not a function
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 9 May 2013 18:06:03 +0000 (20:06 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Thu, 9 May 2013 18:06:03 +0000 (20:06 +0200)
Removed parenthesis after print

Change-Id: I1343872de7aa7c64952a3d86a63aaa091e46bda3

includes/Import.php
includes/OutputPage.php
includes/db/DatabaseMssql.php
maintenance/Maintenance.php
maintenance/language/checkDupeMessages.php
tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
tests/phpunit/includes/api/query/ApiQueryTestBase.php

index 7b078db..8b7af02 100644 (file)
@@ -428,11 +428,11 @@ class WikiImporter {
                        }
                }
 
-               print( var_dump(
+               print var_dump(
                        $lookup[$this->reader->nodeType],
                        $this->reader->name,
                        $this->reader->value
-               ) . "\n\n" );
+               ) . "\n\n";
        }
 
        /**
index 4a2b17a..746cd0e 100644 (file)
@@ -2076,7 +2076,7 @@ class OutputPage extends ContextSource {
        }
 
        /**
-        * Actually output something with print().
+        * Actually output something with print.
         *
         * @param string $ins the string to output
         */
index 293557f..130ac70 100644 (file)
@@ -674,7 +674,7 @@ class DatabaseMssql extends DatabaseBase {
                $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 @@ class DatabaseMssql extends DatabaseBase {
                $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 @@ class DatabaseMssql extends DatabaseBase {
                $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 );
index 2162869..94f9402 100644 (file)
@@ -327,7 +327,7 @@ abstract class Maintenance {
                }
                if ( $channel === null ) {
                        $this->cleanupChanneled();
-                       print( $out );
+                       print $out;
                } else {
                        $out = preg_replace( '/\n\z/', '', $out );
                        $this->outputChanneled( $out, $channel );
index 55e34be..190b237 100644 (file)
@@ -95,22 +95,22 @@ if ( $run ) {
        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 ( $run ) {
                        }
                }
                if ( !strcmp( $runMode, 'php' ) ) {
-                       print( ");\n" );
+                       print ");\n";
                }
                if ( !strcmp( $runMode, 'text' ) ) {
                        if ( $count == 1 ) {
index 0acbe9f..fbb1e64 100644 (file)
@@ -75,7 +75,7 @@ abstract class ApiQueryContinueTestBase extends ApiQueryTestBase {
                        //$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 @@ abstract class ApiQueryContinueTestBase extends ApiQueryTestBase {
                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 ) {
index d712bc0..8ee8ea9 100644 (file)
@@ -109,10 +109,10 @@ STR;
                        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
                }