Suppressing PHP errors in admin panel - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: Suppressing PHP errors in admin panel (/showthread.php?tid=77979) |
Suppressing PHP errors in admin panel - nyquil - 11-14-2020 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! RE: Suppressing PHP errors in admin panel - captain-sensible - 11-15-2020 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 |