Fixes #4823 and #6005: yii message accuracy and error handling were improved by using PHP tokenizer instead of regular expressions. Removed eval() as well.

This commit is contained in:
Alexander Makarov
2014-11-22 02:19:10 +03:00
parent acbf0cccbc
commit e88a5d9cc4
3 changed files with 89 additions and 24 deletions

View File

@ -86,7 +86,7 @@ abstract class BaseMessageControllerTest extends TestCase
protected function createSourceFile($content)
{
$fileName = $this->sourcePath . DIRECTORY_SEPARATOR . md5(uniqid()) . '.php';
file_put_contents($fileName, $content);
file_put_contents($fileName, "<?php\n" . $content);
return $fileName;
}