diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php
index b2ebd086..1df437e1 100644
--- a/include/functions_entries.inc.php
+++ b/include/functions_entries.inc.php
@@ -1358,8 +1358,10 @@ function serendipity_updertEntry($entry) {
$categories = $entry['categories'];
unset($entry['categories']);
- $had_categories = $entry['had_categories'];
- unset($entry['had_categories']);
+ if (isset($entry['had_categories'])) {
+ $had_categories = $entry['had_categories'];
+ unset($entry['had_categories']);
+ }
$newEntry = 0;
$exflag = 0;
diff --git a/include/functions_trackbacks.inc.php b/include/functions_trackbacks.inc.php
index b9eda6b1..899a3360 100644
--- a/include/functions_trackbacks.inc.php
+++ b/include/functions_trackbacks.inc.php
@@ -760,7 +760,7 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
continue;
}
- if (preg_match_all('@
]+?alt=["\']?([^\'">]+?)[\'"][^>]+?>@i', $names[$i], $img_alt)) {
+ if (isset($names[$i]) && preg_match_all('@
]+?alt=["\']?([^\'">]+?)[\'"][^>]+?>@i', $names[$i], $img_alt)) {
if (is_array($img_alt) && is_array($img_alt[0])) {
foreach($img_alt[0] as $alt_idx => $alt_img) {
// Replace all
s within a link with their respective ALT tag, so that references
@@ -780,7 +780,9 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
if (is_object($serendipity['logger'] ?? null)) $serendipity['logger']->debug($row);
}
- $names[$i] = strip_tags($names[$i]);
+ if (isset($names[$i])) {
+ $names[$i] = strip_tags($names[$i]);
+ }
if (empty($names[$i])) {
if (is_object($serendipity['logger'] ?? null)) $serendipity['logger']->debug("Found reference $locations[$i] w/o name. Adding location as name");
$names[$i] = $locations[$i];
diff --git a/include/lang.inc.php b/include/lang.inc.php
index f02c813d..f5573053 100644
--- a/include/lang.inc.php
+++ b/include/lang.inc.php
@@ -31,7 +31,6 @@ if (!defined('serendipity_LANG_LOADED') || serendipity_LANG_LOADED !== true) {
}
// Try and include preferred language from the configurated setting
-
if (@include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_'. $serendipity['lang'] .'.inc.php') ) {
// Only here can we truly say the language is loaded
define('serendipity_LANG_LOADED', true);
diff --git a/include/plugin_api.inc.php b/include/plugin_api.inc.php
index 086ea053..b6ccc7a4 100644
--- a/include/plugin_api.inc.php
+++ b/include/plugin_api.inc.php
@@ -1816,13 +1816,13 @@ class serendipity_event extends serendipity_plugin
} else {
$key = &$eventData[0][$fieldname];
}
- } elseif (is_array($eventData) && is_array($eventData['properties'])) {
+ } elseif (is_array($eventData) && is_array($eventData['properties'] ?? null)) {
if (!empty($eventData['properties']['ep_cache_' . $fieldname])) {
$key = &$eventData['properties']['ep_cache_' . $fieldname];
} else {
$key = &$eventData[$fieldname];
}
- } elseif (is_array($eventData[0]) && isset($eventData[0][$fieldname])) {
+ } elseif (isset($eventData[0]) && isset($eventData[0][$fieldname])) {
$key = &$eventData[0][$fieldname];
} elseif (isset($eventData[$fieldname])) {
$key = &$eventData[$fieldname];
diff --git a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php
index cdc704c4..0f6349c3 100644
--- a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php
+++ b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php
@@ -772,7 +772,7 @@ class serendipity_event_entryproperties extends serendipity_event
break;
case 'backend_entry_presave':
- if (is_array($serendipity['POST']['properties'])) {
+ if (is_array($serendipity['POST']['properties'] ?? null)) {
$this->applyProperties($serendipity['POST']['properties']);
}
break;