[x] This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
[x] This is not a source plugin (summernote) issue. (Those should be directed to the plugin issues repo).
[x] I have attempted to find the simplest possible steps to reproduce the issue.
[ ] I have included a failing test as a pull request (Optional).
Steps to reproduce the issue
use PHP Version 5.6.40 on CentOS
use Demo of Summernote with model and activeform:
// Usage with ActiveForm and model and default settings echo $form->field($model, 'content')->widget(Summernote::class, [ 'options' => ['placeholder' => 'Edit your blog content here...'] ]);
Expected behavior and actual behavior
PHP Compile Error:
yii\base\ErrorException - Cannot use [] for reading in /var/www/inwanet.inwatec.com/public_html/vendor/kartik-v/yii2-editors/src/assets/BaseAsset.php
Fix:
change Line 27 in the above file from:
$this->$ext[] = YII_DEBUG ? "{$file}.{$ext}" : "{$file}.min.{$ext}";
to:
$this->{$ext}[] = YII_DEBUG ? "{$file}.{$ext}" : "{$file}.min.{$ext}";
Prerequisites
master
branch of yii2-editors.Steps to reproduce the issue
// Usage with ActiveForm and model and default settings echo $form->field($model, 'content')->widget(Summernote::class, [ 'options' => ['placeholder' => 'Edit your blog content here...'] ]);
Expected behavior and actual behavior
PHP Compile Error:
yii\base\ErrorException - Cannot use [] for reading in /var/www/inwanet.inwatec.com/public_html/vendor/kartik-v/yii2-editors/src/assets/BaseAsset.php
Fix: change Line 27 in the above file from:
$this->$ext[] = YII_DEBUG ? "{$file}.{$ext}" : "{$file}.min.{$ext}";
to:
$this->{$ext}[] = YII_DEBUG ? "{$file}.{$ext}" : "{$file}.min.{$ext}";
Environment
Browsers
Operating System
Libraries
Isolating the problem