I am getting thrown a PHP Notice – yii\base\ErrorException whenever I create a new Entry i.e. Blog Post.
It breaks because $single isn't defined outside the for-loop. And then you're accessing the variable-on-the-fly outside of the loop. If there are no singles, the variable fails.
Steps to reproduce
Install and enable verbb/expanded-singles:1.0.9 plugin
Description
I am getting thrown a
PHP Notice – yii\base\ErrorException
whenever I create a new Entry i.e. Blog Post.It breaks because $single isn't defined outside the for-loop. And then you're accessing the variable-on-the-fly outside of the loop. If there are no singles, the variable fails.
Steps to reproduce
verbb/expanded-singles:1.0.9
pluginAdditional info
Suggested Action
Declare the $single variable before the loop. Like this diff https://gist.github.com/al-bglhk/3a80c015203a0b72bd5b4b4e11f2a059