symphony-3
symphony-3 copied to clipboard
in_array() expects parameter 2 to be array, null given
When attaching more than one data source to a view, I'm getting the following error when trying to render the view on the frontend:
in_array() expects parameter 2 to be array, null given
An error occurred in /Users/tonyarnold/Sites/Contracts/wcc-fid.local/symphony/lib/class.general.php around line 824
819 }
820
821 protected static $dependencies;
822
823 protected function dependenciesSortCallback($a, $b) {
824 return (in_array($b, self::$dependencies[$a]) ? 1 : -1);
825 }
826
827 /***
828
OK, this got in the way - here's a quick fix:
protected function dependenciesSortCallback($a, $b) {
return (is_array(self::$dependencies[$a]) && in_array($b, self::$dependencies[$a]) ? 1 : -1);
}