In the template, not all variables are replaced

Create PHP template:

        \$model = new ${MODEL};
        if (isset(\$_POST['${MODEL}'])) {             \$model->attributes = \$_POST['${MODEL}'];             if (\$image = CUploadedFile::getInstance(\$model, 'image')) {                 \$fileName = mktime() .'.'. \$sourcePath['extension'];                 \$model->image = \$fileName;                 \$image->saveAs(Yii::app()->getBasePath() . '/../images/upload/${DIR}/' . \$fileName);             }         }



Result:

        $model = new MyModel;
        if (isset(\$_POST['$MODEL'])) {             $model->attributes = \$_POST['$MODEL'];             if ($image = CUploadedFile::getInstance($model, 'image')) {                 $fileName = mktime() . '.' . \$sourcePath['extension'];                 $image->saveAs(Yii::app()->getBasePath() . '/../images/upload/mydirectory/' . $fileName);             }         }



Why do not all variables have been replaced?
2 comments
Comment actions Permalink

Hi Max,

Possibly related: http://youtrack.jetbrains.net/issue/WI-8979

If it's not -- then I would suggest creating new ticket on Issue Tracker.

0
Comment actions Permalink

It seems. But I do not see errors.

0

Please sign in to leave a comment.