From 7328f386ae7276a43f8530135827a454f642cf4c Mon Sep 17 00:00:00 2001 From: crazycatdevs <44431938+crazycatdevs@users.noreply.github.com> Date: Sat, 21 Oct 2023 17:51:01 +0200 Subject: [PATCH] Corrects #293 - Undefined array key "src" Warning: Undefined array key "src" in lib/plugins/translation/action.php on line 100 --- action.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.php b/action.php index b192690..a593075 100644 --- a/action.php +++ b/action.php @@ -97,7 +97,8 @@ public function translateJS(Doku_Event $event) $count = count($event->data['script']); for ($i = 0; $i < $count; $i++) { - if (strpos($event->data['script'][$i]['src'], '/lib/exe/js.php') !== false) { + if (array_key_exists('src', $event->data['script'][$i]) && + strpos($event->data['script'][$i]['src'], '/lib/exe/js.php') !== false) { $event->data['script'][$i]['src'] .= '&lang=' . hsc($conf['lang']); } }