symphony-3 icon indicating copy to clipboard operation
symphony-3 copied to clipboard

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

Open tonyarnold opened this issue 13 years ago • 1 comments

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 avatar Sep 01 '10 08:09 tonyarnold

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

tonyarnold avatar Sep 02 '10 14:09 tonyarnold