Revert r107054: breaks execution of lines that might test or output '<?php' say when...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 3 Jan 2012 22:29:32 +0000 (22:29 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 3 Jan 2012 22:29:32 +0000 (22:29 +0000)
Is apparently meant to strip an initial line from PHP script files being piped in, but is insufficient to actually catch all cases.

maintenance/eval.php

index 3623ca6..9ad51bb 100644 (file)
@@ -74,11 +74,6 @@ while ( ( $line = Maintenance::readconsole() ) !== false ) {
                readline_add_history( $line );
                readline_write_history( $historyFile );
        }
-       if( false !== strpos($line, "<?php") ) {
-               # Someone sent a .php file to STDIN so we do not want
-               # to interprate the special '<?php'.
-               continue;
-       }
        $val = eval( $line . ";" );
        if ( wfIsHipHop() || is_null( $val ) ) {
                echo "\n";