View Single Post
  #44  
Old 01-27-2014, 03:52 AM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,380
Kyttias is on a distinguished road
Default

Quote:
Originally Posted by Hall of Famer View Post
Well most of these aint really problems, especially the notices. All you have to do is to disable notice errors in php.ini. For the strict standard error, go to /classes/class_radiolist.php and change:

PHP Code:
public function add(){ 
to this:

PHP Code:
public function add(GUIComponent $component NULL$index = -1){ 
and the strict standard error should go away as well.
Mhmm! And I'm sure you've got plans to clean those away in the future, sorry if reporting them was redundant. ^^;;;

My line in /classes/class_radiolist.php was actually:
PHP Code:
    public function add(RadioButton $radio$index = -1){ 
but changing it to yours gave me this beauty:
PHP Code:
( ! ) Fatal errorCall to a member function getName() on a non-object in C:\wamp\www\Mysidia\classes\class_radiolist.php on line 44
Call Stack
#    Time    Memory    Function    Location
1    0.0018    275152    {main}( )    ..\index.php:0
2    0.0107    389752    IndexController
::main( )    ..\index.php:78
3    0.9250    5257392    FrontController
->render( )    ..\index.php:74
4    0.9250    5257632    RegisterView
->index( )    ..\class_frontcontroller.php:100
5    0.9884    5506096    RadioList
->add( )    ..\registerview.php:49 
Can I get the full function? (Before the edit, mine was:)
PHP Code:
public function add(RadioButton $radio$index = -1){
        if(
$radio->getName() != $this->name) throw new GUIException("Cannot add unrelated radiobuttons to a RadioList.");
        
parent::add($radio$index);            
    } 
I couldn't find an add function with no parameter, just that one. @u@;;

However! I did work around the original Strict alert, with the code my install came with, because I can also turn Strict alerts off in php.ini, apparently. error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT does the trick.

Last edited by Kyttias; 01-27-2014 at 04:04 AM.