lostnucleus Posted May 11, 2010 Share Posted May 11, 2010 Suppressing error for functions work @fopen(); but what if I want to supress error for object functions. e.g $myObj->fopen(); how ill i supress it from showing errors ?? In real life i want to supress Strict Standards: Declaration of Form_ImageUpload::setAction() should be compatible with that of Zend_Form::setAction() in G:\Program Files (x86)\Zend\Apache2\htdocs\main\application\Forms\ImageUpload.php on line 3 Which is happening becose I have overided and class function with mine which accepts two parameters instead of one like in parent class. Thanx in Advance as usual. Link to comment https://forums.phpfreaks.com/topic/201328-how-to-supress-error-for-object-functions/ Share on other sites More sharing options...
trq Posted May 11, 2010 Share Posted May 11, 2010 I'm not going to go into why suppressing errors is a bad idea but will just say that it slows down your code. Anyway.... Just append the error suppressor to the offending code. eg; @$myObj->fopen(); Link to comment https://forums.phpfreaks.com/topic/201328-how-to-supress-error-for-object-functions/#findComment-1056245 Share on other sites More sharing options...
Mchl Posted May 11, 2010 Share Posted May 11, 2010 It's a 'Strict Standards' warning, so if you're not concerned with those (after all, they're not part of E_ALL so far), you can diasable E_STRICT error level from error_reporting Link to comment https://forums.phpfreaks.com/topic/201328-how-to-supress-error-for-object-functions/#findComment-1056264 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.