r107952 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107951‎ | r107952 | r107953 >
Date:22:29, 3 January 2012
Author:brion
Status:ok
Tags:
Comment:
Revert r107054: breaks execution of lines that might test or output '<?php' say when generating a PHP script
Is apparently meant to strip an initial line from PHP script files being piped in, but is insufficient to actually catch all cases.
Modified paths:
  • /trunk/phase3/maintenance/eval.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/eval.php
@@ -74,11 +74,6 @@
7575 readline_add_history( $line );
7676 readline_write_history( $historyFile );
7777 }
78 - if( false !== strpos($line, "<?php") ) {
79 - # Someone sent a .php file to STDIN so we do not want
80 - # to interprate the special '<?php'.
81 - continue;
82 - }
8378 $val = eval( $line . ";" );
8479 if ( wfIsHipHop() || is_null( $val ) ) {
8580 echo "\n";

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107054do not evaluate '<?php' line...hashar11:06, 22 December 2011

Status & tagging log