From 1cc5eaf9dee0e71aefbce1ff0f28c86ff320c053 Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Mon, 15 Apr 2019 23:57:08 +0200 Subject: backport: Fix a warning if links sticky status isn't set - initiate its status to false when the link is created - if not defined, initiate its status to false (can happen if the updater hasn't run) This is a backport of https://github.com/shaarli/Shaarli/pull/1270 Original author information: commit b790f900c937d0d8f6eccc15d2b4c26023f3d276 Author: ArthurHoaro Date: Sat Feb 9 14:04:16 2019 +0100 Signed-off-by: VirtualTam --- index.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index acfcc660..4deed197 100644 --- a/index.php +++ b/index.php @@ -1179,6 +1179,8 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, $link['thumbnail'] = $thumbnailer->get($url); } + $link['sticky'] = isset($link['sticky']) ? $link['sticky'] : false; + $pluginManager->executeHooks('save_link', $link); $LINKSDB[$id] = $link; -- cgit v1.2.3