mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #881 from simonwelsh/2.4-5.4-fixes
Minor PHP5.4 fixes
This commit is contained in:
commit
6a06965b37
@ -240,8 +240,8 @@ if(isset($_GET['debugmanifest'])) Debug::show(file_get_contents(MANIFEST_FILE));
|
||||
// This is necessary to force developers to acknowledge and fix
|
||||
// notice level errors (you can override this directive in your _config.php)
|
||||
if (Director::isLive()) {
|
||||
if(defined('E_DEPRECATED')) error_reporting((E_ALL ^ E_NOTICE) ^ E_DEPRECATED);
|
||||
else error_reporting(E_ALL ^ E_NOTICE);
|
||||
if(defined('E_DEPRECATED')) error_reporting(E_ALL & ~(E_NOTICE | E_DEPRECATED | E_STRICT));
|
||||
else error_reporting(E_ALL & ~E_NOTICE);
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// POST-MANIFEST COMMANDS
|
||||
|
@ -130,7 +130,9 @@ class SS_Backtrace {
|
||||
if($showArgs && isset($item['args'])) {
|
||||
$args = array();
|
||||
foreach($item['args'] as $arg) {
|
||||
if(!is_object($arg) || method_exists($arg, '__toString')) {
|
||||
if(is_array($arg)) {
|
||||
$args[] = 'Array';
|
||||
} elseif(!is_object($arg) || method_exists($arg, '__toString')) {
|
||||
$args[] = (string) $arg;
|
||||
} else {
|
||||
$args[] = get_class($arg);
|
||||
@ -175,4 +177,4 @@ class SS_Backtrace {
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user