PDA

View Full Version : Strict Standards Error?


LucasA33
12-30-2013, 06:24 AM
PHP Version 5.4.21

Strict Standards: Declaration of AdminSidebar::setDivision() should be compatible with Sidebar::setDivision(GUIComponent $module) in /home/xxx/public_html/ranch/classes/class_adminsidebar.php on line 18

Since I moved hosts to godaddy, I've gotten this error in ACP.

Hall of Famer
12-30-2013, 11:05 AM
Well first of all I am not sure this script actually works on GoDaddy, you may end up experiencing other issues but hopefully you will be fine. For this one, just copy whatever is inside the parenthesis (GUIComponent $module) from the setDivision method in Sidebar to AdminSideBar and it will disappear. An alternative solution is to simply disable strict standard error(as it does not really affect your site in any way more than poping up an annoying message) from your server.

LucasA33
01-04-2014, 01:24 AM
Minus a few errors such as siggy images not loading, then there isn't much.

FRivArt
01-08-2014, 04:01 PM
Got this right now. What am I supposed to do, exactly? In noob speak....

In the class_sidebar file, I have:
/**
* The setDivision method, setter method for property $division.
* It is set internally upon object instantiation, cannot be accessed in client code.
* @param GUIComponent $module
* @access protected
* @return Void
*/
protected function setDivision(GUIComponent $module){
if(!$this->division){
$this->division = new Division;
$this->division->setClass("sidebar");
}
$this->division->add($module);
}
In the class_adminsidebar file, it's:
/**
* The setDivision method, setter method for property $division.
* It is set internally upon object instantiation, cannot be accessed in client code.
* @param ArrayList $components
* @access protected
* @return Void
*/
protected function setDivision($components){
$this->division = new Division($components);
$this->division->setClass("sidebar");
}
Is that what I'm supposed to switch? Sure it wouldn't break anything?

LucasA33
01-09-2014, 11:26 AM
IDK it went away after a while, so I assume don't do anything just yet.
I'm not a great coder either so..