nvlad / yii2support

Yii2 Support for PhpStorm / IntelliJ IDEA
https://plugins.jetbrains.com/idea/plugin/9388-yii2-support
Other
294 stars 53 forks source link

Missing View Variable Error #172

Open ghost opened 6 years ago

ghost commented 6 years ago

What steps will reproduce the problem?

1) Create a view, first line check isset($variable) 2) render the view and don't pass the variable

What is the expected result?

Don't show any error

What do you get instead?

Missing Variable, is there any other way to use optional variables in views?

Additional info

Q A
IDE Name PhpStorm
IDE Version 2017.3.6
Plugin version 0.8.42.3
nvlad commented 6 years ago

Thanx for reporting. Issue for this trouble already exist #161

DanielArgent commented 2 years ago

Hi! So setting default value in the view file doesn't eliminates this problem? Will it be fixed in the future? Probably, creating of special doc comment for view's files to mark a variable as optional is a solution?