From bee5635ec62181e79100cfb6d5efbab0038c6dc6 Mon Sep 17 00:00:00 2001 From: azett Date: Sun, 13 Nov 2022 13:16:45 +0100 Subject: [PATCH] Fixed PHP warning - thx laborix! --- fp-plugins/prettyurls/plugin.prettyurls.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fp-plugins/prettyurls/plugin.prettyurls.php b/fp-plugins/prettyurls/plugin.prettyurls.php index d424597..9e8de01 100644 --- a/fp-plugins/prettyurls/plugin.prettyurls.php +++ b/fp-plugins/prettyurls/plugin.prettyurls.php @@ -407,7 +407,8 @@ class Plugin_PrettyURLs { $this->cache_delete_elem($id, $date); - if ($this->index [$date ['y']] [$date ['m']] === false) { + // Add year and month keys to index, if not present already + if (!array_key_exists($date ['y'], $this->index) || !array_key_exists($date ['m'], $this->index [$date ['y']]) || $this->index [$date ['y']] [$date ['m']] === false) { $this->index [$date ['y']] [$date ['m']] = array(); }