Fixup a couple more undefined variables
[lhc/web/wiklou.git] / maintenance / fuzz-tester.php
index 34988ba..124b017 100644 (file)
@@ -1489,7 +1489,7 @@ class specialBlockmeTest extends pageTest {
 
                // sometimes we specify "ip", and sometimes we don't.
                if ( wikiFuzz::randnum( 1 ) == 0 ) {
-                       $this->params["ip"] = wikiFuzz::chooseInput( array( "10.12.41.213", wikiFuzz::randnum( -10, 8134 ), wikiFuzz::makeFuzz( 2 ) ) );
+                       $this->params["ip"] = wikiFuzz::chooseInput( array( "10.12.41.213", wikiFuzz::randnum( 8134, -10 ), wikiFuzz::makeFuzz( 2 ) ) );
                }
        }
 }
@@ -2509,8 +2509,8 @@ function dbErrorLogged() {
        // first time running this function
        if ( !isset( $filesize ) ) {
                // create log if it does not exist
-               if ( !file_exists( DB_ERROR_LOG_FILE ) ) {
-                       saveFile( "", DB_ERROR_LOG_FILE );
+               if ( DB_ERROR_LOG_FILE && !file_exists( DB_ERROR_LOG_FILE ) ) {
+                       saveFile( '', DB_ERROR_LOG_FILE );
                }
                $filesize = filesize( DB_ERROR_LOG_FILE );
                return false;