Low Variables Select Entries Throws PHP Notice
This could be some artifact of upgrading from EE 2 to EE 3, I don't know. I was getting a PHP notice coming from vt.low_select_entries.php:
array_filter() expects parameter 1 to be array, string given.
user/addons/low_variables/types/low_select_entries/vt.low_select_entries.php, line 278
On line 278, $this->settings('categories') was a string rather than an array.
I fixed the notice by doing this:
$categories = $this->settings('categories');
$categories = is_array($categories) ? $categories : array();
$categories = array_filter($categories);
I don't know if there's a better way or a root cause somewhere else.
Replies
Low 9 May 2017 13:46
Weird. Did the notice not go away after saving the settings?