symphonycms / symphony-3

Symphony 3.0 ftw
http://symphony-cms.com
MIT License
33 stars 18 forks source link

in_array() expects parameter 2 to be array, null given #65

Open tonyarnold opened 14 years ago

tonyarnold commented 14 years ago

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  
tonyarnold commented 14 years ago

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);
    }