This happen when you are sending to eval.php a php file. The first line
is the string '<?php' which is passed to eval(). Boom!
This patch skip that string.
Example usage:
$ cat somefile.php
<?php
echo "Working!\n";
$
$ cat somefile.php | php maintenance/eval.php
Working!
$
readline_add_history( $line );
readline_write_history( $historyFile );
}
+ if( false !== strpos($line, "<?php") ) {
+ # Someone send 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";