From 016bc6851bb95e32ca96bbc2b73639e1524cc0b7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Sep 2018 23:37:51 +0200 Subject: [PATCH] Fix generation of tpl --- htdocs/core/lib/website.lib.php | 2 +- htdocs/public/website/styles.css.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index 85d3f1967e9..1957f2c820d 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -614,7 +614,7 @@ function dolSavePageContent($filetpl, $object, $objectpage) $tplcontent.= ''."\n"; $tplcontent.= ''."\n"; $tplcontent.= ''."\n"; - $tplcontent.= ''."\n"; + $tplcontent.= ''."\n"; $tplcontent.= ''."\n"; $tplcontent.= '/ims\', \'\', file_get_contents(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")); ?>'."\n"; $tplcontent.= ''."\n"; diff --git a/htdocs/public/website/styles.css.php b/htdocs/public/website/styles.css.php index 674651f9e29..3e2462d889c 100644 --- a/htdocs/public/website/styles.css.php +++ b/htdocs/public/website/styles.css.php @@ -85,7 +85,7 @@ if (empty($pageid)) $objectpage=new WebsitePage($db); $array=$objectpage->fetchAll($object->id); - if (count($array) > 0) + if (is_array($array) && count($array) > 0) { $firstrep=reset($array); $pageid=$firstrep->id;