mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR User error was assuming $templateList is always an array when it can also be a string.
This commit is contained in:
parent
fece61c90b
commit
0a3de455cf
@ -326,9 +326,13 @@ class SSViewer {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$this->chosenTemplates) user_error("None of these templates can be found in theme '"
|
if(!$this->chosenTemplates) {
|
||||||
|
$templateList = (is_array($templateList)) ? $templateList : array($templateList);
|
||||||
|
|
||||||
|
user_error("None of these templates can be found in theme '"
|
||||||
. self::current_theme() . "': ". implode(".ss, ", $templateList) . ".ss", E_USER_WARNING);
|
. self::current_theme() . "': ". implode(".ss, ", $templateList) . ".ss", E_USER_WARNING);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if at least one of the listed templates exists
|
* Returns true if at least one of the listed templates exists
|
||||||
|
Loading…
Reference in New Issue
Block a user