View Single Post
  #6  
Old 01-29-2015, 04:05 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,857
Kyttias is on a distinguished road
Default

Alright, well what did you change in the adminsidebar class to get it to work? I changed $components to $component in the parameters, then where it was used, and then everywhere on the page and none of it worked. The error changed to -

Code:
 Catchable fatal error: Argument 1 passed to AdminSidebar::setDivision() must be an instance of GUIComponent, instance of Resource\Collection\ArrayList given, called in /srv/disk3/1793798/www/novul/classes/class_adminsidebar.php on line 187 and defined in /srv/disk3/1793798/www/novul/classes/class_adminsidebar.php on line 36
As for your error, in classes/class_dropdownlist.php, around line 105 (by the way, it'll help if you give the full error with line numbers, if possible, so I don't have to compare entire files), change this:
PHP Code:
    public function add($option$index = -1){
        if(!(
$option instanceof Option) and !($option instanceof OptGroup)) throw new GUIException("Cannot add a non-option type component to dropdown list.");
        
parent::add($option$index);            
    } 
into this:
PHP Code:
    public function add(GUIComponent $option$index = -1){
        if(!(
$option instanceof Option) and !($option instanceof OptGroup)) throw new GUIException("Cannot add a non-option type component to dropdown list.");
        
parent::add($option$index);            
    } 
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote