Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Disabling Warnings and Notices when logged in as admin

Go to End

4 Posts   3333 Views


Community Member, 146 Posts

1 October 2010 at 6:42am

Hi, I'm haveing a Problem with a Warning thrown when trying to add a new ImageGalleryPage.

It's nothing more than a stupid warning, so i tried to disable warnings and set error_reporting to 0. phpinfo() shows me that error reporting is off, but if I am in the Admin Backend, it seems that error reporting gets reactivatet through ini_set function somewhere inside the code.

So is there a static which I can add to my _config.php to deactivate error_reporting when admin user?


Community Member, 271 Posts

1 October 2010 at 8:12am

Have you set site mode to live?



Forum Moderator, 1899 Posts

1 October 2010 at 11:19pm

I place the following in the _config.php so that when in dev mode I get all the logging and templates refreshed...

if (Director::isDev()) {
ini_set('display_errors', 1);


Community Member, 146 Posts

2 October 2010 at 7:46am

Hi, thanks for your replies, but tha actually didn't solved my Problem.

My Problem is described more detailed in the following Post:

I get a PHP Warning on adding a new ImageGalaryPage. The warning is thrown by the rename function, because the directory to renam does not exist. I am logged in as admin to the Silverstripe Backend so, it seems, this is the reason why the Warning is shown instead of just ignoring it. All changes of error_reporting to 0 in php.ini or .htacces didn't switch of warnings when logged in as admin.