mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
bugfix calling createTemplate(template, data) with empty data array caused notice of array to string conversion (Issue 189)
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
===== 3.1.19-dev ===== (xx.xx.2014)
|
===== 3.1.19-dev ===== (xx.xx.2014)
|
||||||
|
19.04.2014
|
||||||
|
- bugfix calling createTemplate(template, data) with empty data array caused notice of array to string conversion (Issue 189)
|
||||||
|
|
||||||
18.04.2014
|
18.04.2014
|
||||||
- revert bugfix of 5.4.2015 because %-e date format is not supported on all operating systems
|
- revert bugfix of 5.4.2015 because %-e date format is not supported on all operating systems
|
||||||
|
@@ -1220,11 +1220,11 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
*/
|
*/
|
||||||
public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true)
|
public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true)
|
||||||
{
|
{
|
||||||
if (!empty($cache_id) && (is_object($cache_id) || is_array($cache_id))) {
|
if ($cache_id !== null && (is_object($cache_id) || is_array($cache_id))) {
|
||||||
$parent = $cache_id;
|
$parent = $cache_id;
|
||||||
$cache_id = null;
|
$cache_id = null;
|
||||||
}
|
}
|
||||||
if (!empty($parent) && is_array($parent)) {
|
if ($parent !== null && is_array($parent)) {
|
||||||
$data = $parent;
|
$data = $parent;
|
||||||
$parent = null;
|
$parent = null;
|
||||||
} else {
|
} else {
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user