yii-debug-toolbar
yii-debug-toolbar copied to clipboard
Rendering Views With Null Data Throws 500 Not Countable
I get the following 500 error when using a renderPartial()
with no $data
parameter: PHP warning: count(): Parameter must be an array or an object that implements Countable.
Stacktrace points to: /var/www/html/protected/extensions/yii-debug-toolbar/views/panels/views.php line 100.
The signature for renderPartial($view, $data=null)
specifies $data
as optional. The "Views Rendering" panel doesn't account for this and attempts to call count()
on null
resulting in said 500 error.