![]() |
Error messages~
Hello! c: It's me again.. Recently my host moved some sites over to a different server (or something like that..) and so my site was one of the ones that moved. However, now I am getting a ton of error messages. I am not experienced in coding at all, so this is all foreign language to me. Does anyone know how I could fix it? c: Thanks for any help<3
This is on the page to use an item: "Strict Standards: Declaration of DropdownList::add() should be compatible with GUIContainer::add(GUIComponent $component, $index = -1) in /home/capifore/public_html/classes/class_dropdownlist.php on line 184" And these also show up on the ACP: "Strict Standards: Declaration of AdminSidebar::setDivision() should be compatible with Sidebar::setDivision(GUIComponent $module) in /home/capifore/public_html/classes/class_adminsidebar.php on line 18 Warning: Cannot modify header information - headers already sent by (output started at /home/capifore/public_html/classes/class_adminsidebar.php:18) in /home/capifore/public_html/classes/class_cookies.php on line 109 Warning: Cannot modify header information - headers already sent by (output started at /home/capifore/public_html/classes/class_adminsidebar.php:18) in /home/capifore/public_html/classes/class_cookies.php on line 111 Warning: Cannot modify header information - headers already sent by (output started at /home/capifore/public_html/classes/class_adminsidebar.php:18) in /home/capifore/public_html/classes/class_view.php on line 257" |
Well these are just warning messages that do not affect your script, but such messages are annoyingt. To fix that, go to file class_adminsidebar.php and change the method add() to add(GUIComponent $component = NULL, $index = -1).
|
Thank you! But I can't seem to find the exact spot you are talking about. |D
Here's the class_adminsidebar.php if it helps at all. I've tried searching for the method add(), but I'm not sure which one. ^^; Code:
<?php |
Try setDivision() in class_adminsidebar.php to setDivision(GUIComponent $components) and class_DropdownList.php's add() to add(GUIComponent $component, $index = -1)
|
((Sorry for the late reply. I get really busy with school and I had an AP test today. ^^;)
I still am not able to find exactly where you're talking about? I try to find "add()", but it says not found. ^^; <3 |
I was bored since no one has helped me yet, so I decided to research this... stack overflow explains this quite well (although I'm still a little lost since I know very little about php lol)
http://stackoverflow.com/questions/1...ompatible-with http://stackoverflow.com/questions/1...e-with-that-of It seems the problem is because this function in class_sidebar: Code:
/** Code:
/** Either that, or it has something to do with the bug with the order classes are defined and extended. https://bugs.php.net/bug.php?id=46851 The same should apply to the drop down one... Either way, you might try turning off strict error reporting (something to do with a php.ini file I think) and see if your site works just fine. My guess is that the php version or setup on the new server is different, and it's possible (I think) that strict error reporting was turned off before otherwise you might have seen the same messages before. Hopefully Hall Of Famer can shed a little more light on this, since all of my knowledge comes from an hour of googling because this caught my interest. All I can give is information, but I can't tell you what to do with it cause I'm clueless. I have read at least 50 pages of this section of the forum, and I think previous advice was to turn off strict error reporting, but I can't remember for sure. Same goes for changing something to suppress the warnings about the headers. That is just telling you that something else on the page already sent headers, so it can't send them again... and previous posts in this forum have suggested they aren't important so just hide them. HEY, I just noticed something.... could it be because one is a GUIComponent parameter and the other is an ArrayList? |
Yes, incompatible declarations are when a function's parameters don't match its parent's function parameters for example. Class AdminSidebar extends from Sidebar, so the function's parameters should have the same type, the one in adminsidebar doesn't have a type, that's why I said to put a GUIComponent before the variable name.
PHP doesn't care much about variable types, you don't even need to give them a type, that's why it's just a warning. And the add function is in class_dropdownlist.php file as public function add($option, $index = -1) ^^ |
(Late reply again..:S)
I still have no clue what you are talking about. |D I understand that the problem is with the class_sidebar and some other things, but I don't understand what you mean, and what I need to replace to fix it. c:<3 |
In class_adminsidebar.php, find this:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Thanks! c: But whenever I change it in the class_adminsidebar it says
"Catchable fatal error: Argument 1 passed to AdminSidebar::setDivision() must be an instance of GUIComponent, instance of Resource\Collection\ArrayList given, called in /home/capifore/public_html/classes/class_adminsidebar.php on line 187 and defined in /home/capifore/public_html/classes/class_adminsidebar.php on line 36" The other problem seems to be fixed<3 c: |
All times are GMT -5. The time now is 01:52 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.