21309 Posts in 5738 Topics by 2603 members
General Questions
SilverStripe Forums » General Questions » Disabling Warnings and Notices when logged in as admin
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1184 Views |
-
Disabling Warnings and Notices when logged in as admin

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?
-
Re: Disabling Warnings and Notices when logged in as admin

1 October 2010 at 8:12am
Have you set site mode to live?
Director::set_environment_type('live');
-
Re: Disabling Warnings and Notices when logged in as admin

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);
error_reporting(E_ALL);
SSViewer::flush_template_cache();
Debug::log_errors_to('err.log');
} -
Re: Disabling Warnings and Notices when logged in as admin

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:
http://ssorg.bigbird.silverstripe.com/all-other-modules/show/250910?showPost=293108I 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.
| 1184 Views | ||
|
Page:
1
|
Go to Top |



