]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - index.php
Fix a JS bug preventing AJAX tag deletion to work
[github/shaarli/Shaarli.git] / index.php
index 8f6ee50affaf45f69c0d169f4b4f36901af5f1ba..eb717536c58f33d8b8a63b7933765c075d364b35 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1084,7 +1084,8 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
             die(t('Wrong token.'));
         }
 
-        $alteredLinks = $LINKSDB->renameTag(escape($_POST['fromtag']), escape($_POST['totag']));
+        $toTag = isset($_POST['totag']) ? escape($_POST['totag']) : null;
+        $alteredLinks = $LINKSDB->renameTag(escape($_POST['fromtag']), $toTag);
         $LINKSDB->save($conf->get('resource.page_cache'));
         foreach ($alteredLinks as $link) {
             $history->updateLink($link);