From: VirtualTam Date: Thu, 3 Dec 2015 19:30:46 +0000 (+0100) Subject: fix: assign template variables to empty values so they can be evaluated X-Git-Tag: v0.6.2~10^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=refs%2Fpull%2F398%2Fhead;hp=b6a54537b8823d2b96e9bdb64e280959d6681c36;p=github%2Fshaarli%2FShaarli.git fix: assign template variables to empty values so they can be evaluated Regression introduced in #394 Signed-off-by: VirtualTam --- diff --git a/application/ApplicationUtils.php b/application/ApplicationUtils.php index 6d878110..274331e1 100644 --- a/application/ApplicationUtils.php +++ b/application/ApplicationUtils.php @@ -50,6 +50,8 @@ class ApplicationUtils * @param bool $enableCheck whether to check for new versions * @param bool $isLoggedIn whether the user is logged in * + * @throws Exception an invalid branch has been set for update checks + * * @return mixed the new version code if available and greater, else 'false' */ public static function checkUpdate($currentVersion, diff --git a/index.php b/index.php index d26c0c1e..e2592045 100644 --- a/index.php +++ b/index.php @@ -643,9 +643,11 @@ class pageBuilder $GLOBALS['config']['UPDATECHECK_BRANCH'] ); $this->tpl->assign('newVersion', escape($version)); + $this->tpl->assign('versionError', ''); } catch (Exception $exc) { logm($exc->getMessage()); + $this->tpl->assign('newVersion', ''); $this->tpl->assign('versionError', escape($exc->getMessage())); }