CodeIgniter Forums

Full Version: Suppressing PHP errors in admin panel
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi folks,

[Disclaimer: I am new to CodeIgniter] I am trying to debug the PHP related warnings in this site: www.radhikavsharma.com. The warning is as follows:

      Strict Standards: Redefining already defined constructor for class MY_Model     in /data/18/3/19/41/3508204/user/3907478/htdocs/system/cms/core/MY_Model.php on line 79

The site was developed a while back by some web-developer and based on SO, I figured that I need to suppress the errors as follows in index.php:
The problem is that I cannot locate index.php in the admin panel. 

   error_reporting(E_ALL ^ E_STRICT);

Question: Which file can I modify (via the site's admin panel) to add the above error-suppression? Any guidance will be appreciated. Thanks!
well its talking about a php class called MY_Model and a constructor:

a constructor is of the form :

public function __construct()
{
//something here
}

what it seems to be hinting at is that you have duplicated it:

public function __construct()
{
//something here
}
public function __construct()
{
//something here
}


you can have in theory as many methods in a class with different names as you like but only one constructor.

Open up MY_Model.php and see if you can see repeat code.

I could understand mistake of repeating a normal method, but a constructor has __construct() so difficult to see how that was repeated, should be top of class and youre quoting line 79 ? you can supress errot reporting but its there for a purpose