From d8d73ab099fadf2fd7a7f1968ccdce727972d456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 11:57:17 +0100 Subject: [PATCH] Fix for PHP Notice Undefined offset: 0, Line 168 of /e107_core/shortcodes/batch/user_shortcodes.php --- e107_core/shortcodes/batch/user_shortcodes.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e107_core/shortcodes/batch/user_shortcodes.php b/e107_core/shortcodes/batch/user_shortcodes.php index f80168642..57269fd21 100644 --- a/e107_core/shortcodes/batch/user_shortcodes.php +++ b/e107_core/shortcodes/batch/user_shortcodes.php @@ -165,15 +165,15 @@ class user_shortcodes extends e_shortcode //require_once(e_HANDLER."level_handler.php"); //$ldata = get_level($this->var['user_id'], $this->var['user_forums'], $this->var['user_comments'], $this->var['user_chats'], $this->var['user_visits'], $this->var['user_join'], $this->var['user_admin'], $this->var['user_perms'], $pref); $ldata = array(); - if (strstr($ldata[0], "IMAGE_rank_main_admin_image")) + if (isset($ldata[0]) && strstr($ldata[0], "IMAGE_rank_main_admin_image")) { return LAN_USER_31; } - elseif(strstr($ldata[0], "IMAGE")) + elseif(isset($ldata[0]) && strstr($ldata[0], "IMAGE")) { return LAN_USER_32; } - else + elseif(isset($ldata[1])) { return $ldata[1]; }