X-Git-Url: https://git.immae.eu/?p=github%2Fshaarli%2FShaarli.git;a=blobdiff_plain;f=index.php;h=eb717536c58f33d8b8a63b7933765c075d364b35;hp=8f6ee50affaf45f69c0d169f4b4f36901af5f1ba;hb=4fa9a3c5d83a1024678596a586afe5df14a345b5;hpb=f28b73b21f705102f8536cd16ea28122aa870e49 diff --git a/index.php b/index.php index 8f6ee50a..eb717536 100644 --- 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);