Follow up r74753, removed pass-by-references and @ operator
authorMarkus Glaser <mglaser@users.mediawiki.org>
Tue, 19 Oct 2010 19:58:58 +0000 (19:58 +0000)
committerMarkus Glaser <mglaser@users.mediawiki.org>
Tue, 19 Oct 2010 19:58:58 +0000 (19:58 +0000)
maintenance/tests/selenium/SeleniumServerManager.php

index 7abb34b..5ef4c66 100644 (file)
@@ -179,12 +179,13 @@ class SeleniumServerManager {
                                // on its port. Note: this solution kinda
                                // stinks, since it uses a wait loop - dnessett
 
+                               wfSuppressWarnings();
                                for ( $cnt = 1;
                                      $cnt <= $this->SeleniumServerStartTimeout;
                                      $cnt++ ) {
-                                       $fp = @fsockopen ( 'localhost',
+                                       $fp = fsockopen ( 'localhost',
                                                $this->SeleniumServerPort,
-                                               &$errno, &$errstr, 0 );
+                                               $errno, $errstr, 0 );
                                        if ( !$fp ) {
                                                sleep( 1 );
                                                continue;
@@ -194,6 +195,7 @@ class SeleniumServerManager {
                                                return 'started';
                                        }
                                }
+                               wfRestoreWarnings();
                                echo ( "Starting Selenium server timed out.\n" );
                                return 'failed';
                        }