mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Checks for array to string conversion (E_NOTICE as of PHP5.4)
This commit is contained in:
parent
75b16f6e1b
commit
840343ffb7
@ -136,7 +136,8 @@ class SS_Backtrace {
|
||||
$args = array();
|
||||
foreach($item['args'] as $arg) {
|
||||
if(!is_object($arg) || method_exists($arg, '__toString')) {
|
||||
$args[] = (strlen((string)$arg) > $argCharLimit) ? substr((string)$arg, 0, $argCharLimit) . '...' : (string)$arg;
|
||||
$sarg = is_array($arg) ? 'Array' : strval($arg);
|
||||
$args[] = (strlen($sarg) > $argCharLimit) ? substr($sarg, 0, $argCharLimit) . '...' : $sarg;
|
||||
} else {
|
||||
$args[] = get_class($arg);
|
||||
}
|
||||
|
@ -319,7 +319,7 @@ class SSViewer {
|
||||
}
|
||||
}
|
||||
|
||||
if(substr((string) $templateList,-3) == '.ss') {
|
||||
if(!is_array($templateList) && substr((string) $templateList,-3) == '.ss') {
|
||||
$this->chosenTemplates['main'] = $templateList;
|
||||
} else {
|
||||
$this->chosenTemplates = SS_TemplateLoader::instance()->findTemplates(
|
||||
|
Loading…
Reference in New Issue
Block a user