r52034 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52033‎ | r52034 | r52035 >
Date:09:39, 17 June 2009
Author:catrope
Status:ok
Tags:
Comment:
switch-master: Avoid use of eval() in ConfEditor
Modified paths:
  • /trunk/tools/switch-master/ConfEditor.php (modified) (history)

Diff [purge]

Index: trunk/tools/switch-master/ConfEditor.php
@@ -560,7 +560,7 @@
561561 $this->error( "expected a string or number for the array key" );
562562 }
563563 if ( $token->type == T_CONSTANT_ENCAPSED_STRING ) {
564 - $text = eval( "return {$token->text};" );
 564+ $text = stripslashes( substr( $token->text, 1, -1 ) );
565565 } else {
566566 $text = $token->text;
567567 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r52041switch-master: Add getVars() method and fix up r52034catrope10:51, 17 June 2009

Status & tagging log