Skip to content

Commit

Permalink
Fixed issue #08788: Notice in LSYii_Application.php is config.php don…
Browse files Browse the repository at this point in the history
…'t have debug and server error log is set to E_ALL

Dev: Need : force error log to show notice AND remove debug=>0 from application/config.php
Dev: Not sure change default error_reporting is a good idea.
  • Loading branch information
Shnoulle committed Mar 2, 2014
1 parent 84404d6 commit 80cae17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions application/core/LSYii_Application.php
Expand Up @@ -55,8 +55,8 @@ public function __construct($config = null)
if(is_string($config)) {
$config = require($config);
}
if ($config['config']['debug'] == 2)

if (isset($config['config']['debug']) && $config['config']['debug'] == 2)
{
// If debug = 2 we add firebug / console logging for all trace messages
// If you want to var_dump $config you could do:
Expand Down
6 changes: 5 additions & 1 deletion index.php
Expand Up @@ -151,7 +151,7 @@
{
$aSettings=array();
}
// Set debug : if not set : don't change
// Set debug : if not set : set to default from PHP 5.3
if (isset($aSettings['config']['debug']))
{
if ($aSettings['config']['debug']>0)
Expand All @@ -165,6 +165,10 @@
error_reporting(0);
}
}
else
{
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);// Not needed if user don't remove his 'debug'=>0, for application/config/config.php (Installation is OK with E_ALL)

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Mar 2, 2014

Author Collaborator

Seems not necessaty, but maybe some other notice somwhere if user remove debug line in config.

}

if (version_compare(PHP_VERSION, '5.3.0', '<'))
die ('This script can only be run on PHP version 5.3.0 or later! Your version: '.PHP_VERSION.'<br />');
Expand Down

0 comments on commit 80cae17

Please sign in to comment.