]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
fix: assign template variables to empty values so they can be evaluated 398/head
authorVirtualTam <virtualtam@flibidi.net>
Thu, 3 Dec 2015 19:30:46 +0000 (20:30 +0100)
committerVirtualTam <virtualtam@flibidi.net>
Thu, 3 Dec 2015 19:30:46 +0000 (20:30 +0100)
Regression introduced in #394

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
application/ApplicationUtils.php
index.php

index 6d878110cfe984f7e5b6e71d8d0801a888e673eb..274331e16f6fe21ac444f330b25c69a0d09e1fe5 100644 (file)
@@ -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,
index d26c0c1e3c9b75c69d6b804c54bb3a04f19290ef..e2592045082cb5c1a573cfc9ce6027a87a128d7e 100644 (file)
--- 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()));
         }