Merge pull request #881 from simonwelsh/2.4-5.4-fixes

Minor PHP5.4 fixes
This commit is contained in:
Ingo Schommer 2012-10-16 06:02:12 -07:00
commit 6a06965b37
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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;
}
}
}