mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 05:48:11 +08:00
Improved strtr calls
This commit is contained in:
@ -61,7 +61,7 @@ class CodeFile extends Object
|
||||
*/
|
||||
public function __construct($path, $content)
|
||||
{
|
||||
$this->path = strtr($path, ['/' => DIRECTORY_SEPARATOR, '\\' => DIRECTORY_SEPARATOR]);
|
||||
$this->path = strtr($path, '/\\', DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR);
|
||||
$this->content = $content;
|
||||
$this->id = md5($this->path);
|
||||
if (is_file($path)) {
|
||||
|
||||
Reference in New Issue
Block a user