From 812746e718ddcc470e37adabb49474b3c6e3f217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 11:26:47 +0100 Subject: [PATCH 01/16] Fix for PHP Notice Undefined index: class, Line 739 of /e107_handlers/theme_handler.php --- e107_handlers/theme_handler.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index 22229f9f1..3ea7805df 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -725,29 +725,24 @@ class e_theme unset($vars['stylesheets']); } - $vars['glyphs'] = array(); if(!empty($vars['glyphicons']['glyph'])) { - foreach($vars['glyphicons']['glyph'] as $val) { $vars['glyphs'][] = array( - 'name' => $val['@attributes']['name'], - 'pattern' => $val['@attributes']['pattern'], - 'path' => $val['@attributes']['path'], - 'class' => $val['@attributes']['class'], - 'prefix' => $val['@attributes']['prefix'], - 'tag' => $val['@attributes']['tag'], + 'name' => isset($val['@attributes']['name']) ? $val['@attributes']['name'] : '', + 'pattern' => isset($val['@attributes']['pattern']) ? $val['@attributes']['pattern'] : '', + 'path' => isset($val['@attributes']['path']) ? $val['@attributes']['path'] : '', + 'class' => isset($val['@attributes']['class']) ? $val['@attributes']['class'] : '', + 'prefix' => isset($val['@attributes']['prefix']) ? $val['@attributes']['prefix'] : '', + 'tag' => isset($val['@attributes']['tag']) ? $val['@attributes']['tag'] : '', ); - } unset($vars['glyphicons']); - } - if($path == "landingzero" ) { From 917074ad3cb3e69543deae0b791e3c59deabe3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 11:27:20 +0100 Subject: [PATCH 02/16] Fix for PHP Notice Undefined index: link_identifier, Line 1986 of /e107_handlers/sitelinks_class.php --- e107_handlers/sitelinks_class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_handlers/sitelinks_class.php b/e107_handlers/sitelinks_class.php index ebb9414eb..02342745a 100644 --- a/e107_handlers/sitelinks_class.php +++ b/e107_handlers/sitelinks_class.php @@ -1977,13 +1977,13 @@ class navigation_shortcodes extends e_shortcode */ function sc_link_parent($parm='') { - return intval($this->var['link_parent']); + return intval($this->var['link_parent']); } function sc_link_identifier($parm='') { - return $this->var['link_identifier']; + return isset($this->var['link_identifier']) ? $this->var['link_identifier'] : ''; } /** From 2e3f25244a04d2c39b989abae1a8d5d169b45af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 11:31:02 +0100 Subject: [PATCH 03/16] Fix for PHP Notice Use of undefined constant LAN_LIST - assumed 'LAN_LIST', Line 24 of /e107_plugins/news/templates/news_template.php --- e107_languages/English/English.php | 1 + e107_languages/English/admin/lan_admin.php | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_languages/English/English.php b/e107_languages/English/English.php index e487a9e7f..80d464ade 100644 --- a/e107_languages/English/English.php +++ b/e107_languages/English/English.php @@ -131,6 +131,7 @@ define("LAN_RE_ORDER", "Re-order"); define("LAN_RELATED", "Related"); define("LAN_CLOSE", "Close"); define("LAN_EXPAND", "Expand"); +define("LAN_LIST", "List"); define("LAN_ENTER_USRNAME_EMAIL", "Please enter your username or email"); // admin php hover field admin name define("LAN_PWD_REQUIRED", "Password is required"); // admin php hover field admin password diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index 60bad7ed6..5ffdc5122 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -391,7 +391,6 @@ define("LAN_MEDIAMANAGER", "Media Manager"); define("LAN_MOREINFO","More Information..."); define("LAN_COMMENTMAN", "Comments Manager"); -define("LAN_LIST", "List"); define("LAN_FILTER", "Filter"); // define("LAN_NO_RECORDS", "No Records Found"); define("LAN_STATUS", "Status"); From 6ba5cac0206273a5a41e538ae9eba5886e9bffec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 11:33:08 +0100 Subject: [PATCH 04/16] Fix for PHP Notice Undefined index: STATUS , Line 110 of /e107_handlers/rate_class.php --- e107_handlers/rate_class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/e107_handlers/rate_class.php b/e107_handlers/rate_class.php index bc41bf58f..b94617d66 100644 --- a/e107_handlers/rate_class.php +++ b/e107_handlers/rate_class.php @@ -107,7 +107,10 @@ class rater $text = ""; foreach($tmp as $k) { - $text .= $TEMPLATE[$k]; + if (!empty($TEMPLATE[$k])) + { + $text .= $TEMPLATE[$k]; + } } return $text; From b8009049338892c9a040a0a303b0f18eecb9a62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 11:37:27 +0100 Subject: [PATCH 05/16] Fix for PHP Notice Use of undefined constant LAN_GALLERY_FRONT_02 - assumed 'LAN_GALLERY_FRONT_02', Line 97 of /e107_plugins/gallery/templates/gallery_template.php --- e107_plugins/gallery/templates/gallery_template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_plugins/gallery/templates/gallery_template.php b/e107_plugins/gallery/templates/gallery_template.php index 39beceb98..b671b4309 100644 --- a/e107_plugins/gallery/templates/gallery_template.php +++ b/e107_plugins/gallery/templates/gallery_template.php @@ -94,7 +94,7 @@ $GALLERY_TEMPLATE['prettyphoto']['content'] = '
- '.LAN_EXPAND.' + '.LAN_EXPAND.'
' . LAN_NEXT . ' ' . LAN_PREVIOUS . ' From bb28fca4ce2ddee1e0340c32db104f30880e9464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 11:40:41 +0100 Subject: [PATCH 06/16] Fix for PHP Notice Undefined index: sub, Line 1456 of /e107_handlers/sitelinks_class.php --- e107_handlers/sitelinks_class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_handlers/sitelinks_class.php b/e107_handlers/sitelinks_class.php index 02342745a..ab39a5d86 100644 --- a/e107_handlers/sitelinks_class.php +++ b/e107_handlers/sitelinks_class.php @@ -1453,7 +1453,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; } $replace[9] = varset($e107_vars[$act]['image']); } - $replace[10] = count($e107_vars[$act]['sub']) > 20 ? 'oversized' : ''; + $replace[10] = (isset($e107_vars[$act]['sub']) && count($e107_vars[$act]['sub']) > 20) ? 'oversized' : ''; if(!empty($e107_vars[$act]['link_data'])) { From 43f38ccdf25fe9419763b2970ef01638771949ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 11:46:42 +0100 Subject: [PATCH 07/16] Fix for PHP Notice Undefined offset: 0, Line 146 of /e107_admin/includes/flexpanel.php --- e107_admin/includes/flexpanel.php | 37 ++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/e107_admin/includes/flexpanel.php b/e107_admin/includes/flexpanel.php index b3b0a65f7..1f9182b61 100644 --- a/e107_admin/includes/flexpanel.php +++ b/e107_admin/includes/flexpanel.php @@ -143,16 +143,30 @@ class adminstyle_flexpanel extends adminstyle_infopanel $ns->setStyle('flexpanel'); $ns->setUniqueId('core-infopanel_help'); $info = $this->getMenuPosition('core-infopanel_help'); + if (!isset($panels[$info['area']][$info['weight']])) + { + $panels[$info['area']][$info['weight']] = ''; + } $panels[$info['area']][$info['weight']] .= $tp->parseTemplate('{ADMIN_HELP}', false, $admin_sc); + // "Latest" box. $ns->setStyle('flexpanel'); $info = $this->getMenuPosition('e-latest-list'); + if (!isset($panels[$info['area']][$info['weight']])) + { + $panels[$info['area']][$info['weight']] = ''; + } $panels[$info['area']][$info['weight']] .= $tp->parseTemplate('{ADMIN_LATEST=infopanel}', false, $admin_sc); + // "Status" box. $ns->setStyle('flexpanel'); $info = $this->getMenuPosition('e-status-list'); + if (!isset($panels[$info['area']][$info['weight']])) + { + $panels[$info['area']][$info['weight']] = ''; + } $panels[$info['area']][$info['weight']] .= $tp->parseTemplate('{ADMIN_STATUS=infopanel}', false, $admin_sc); @@ -196,6 +210,10 @@ class adminstyle_flexpanel extends adminstyle_infopanel $ns->setUniqueId('core-infopanel_mye107'); $coreInfoPanelMyE107 = $ns->tablerender($caption, $mainPanel, "core-infopanel_mye107", true); $info = $this->getMenuPosition('core-infopanel_mye107'); + if (!isset($panels[$info['area']][$info['weight']])) + { + $panels[$info['area']][$info['weight']] = ''; + } $panels[$info['area']][$info['weight']] .= $coreInfoPanelMyE107; @@ -208,6 +226,10 @@ class adminstyle_flexpanel extends adminstyle_infopanel $ns->setUniqueId('core-infopanel_news'); $coreInfoPanelNews = $ns->tablerender(LAN_LATEST_e107_NEWS, e107::getForm()->tabs($newsTabs, array('active' => 'coreFeed')), "core-infopanel_news", true); $info = $this->getMenuPosition('core-infopanel_news'); + if (!isset($panels[$info['area']][$info['weight']])) + { + $panels[$info['area']][$info['weight']] = ''; + } $panels[$info['area']][$info['weight']] .= $coreInfoPanelNews; @@ -228,6 +250,10 @@ class adminstyle_flexpanel extends adminstyle_infopanel $ns->setUniqueId('e-addon-updates'); $addonUpdates = $admin_sc->sc_admin_addon_updates(); $info = $this->getMenuPosition('e-addon-updates'); + if (!isset($panels[$info['area']][$info['weight']])) + { + $panels[$info['area']][$info['weight']] = ''; + } $panels[$info['area']][$info['weight']] .= $addonUpdates; @@ -250,6 +276,10 @@ class adminstyle_flexpanel extends adminstyle_infopanel $inc = $tp->parseTemplate("{PLUGIN=$val|TRUE}"); } $info = $this->getMenuPosition($id); + if (!isset($panels[$info['area']][$info['weight']])) + { + $panels[$info['area']][$info['weight']] = ''; + } $panels[$info['area']][$info['weight']] .= $inc; } } @@ -265,12 +295,13 @@ class adminstyle_flexpanel extends adminstyle_infopanel $id = $val['mode']; $ns->setUniqueId($id); $inc = $ns->tablerender($val['caption'], $val['text'], $val['mode'], true); - $info = $this->getMenuPosition($id); - + if (!isset($panels[$info['area']][$info['weight']])) + { + $panels[$info['area']][$info['weight']] = ''; + } $panels[$info['area']][$info['weight']] .= $inc; } - } From 2719e8796a5b133a84e2c5d27ca2a9ffa62d9e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 11:52:26 +0100 Subject: [PATCH 08/16] Fix for PHP Notice Undefined offset: 0, Line 60 of /e107_plugins/user/e_dashboard.php --- e107_plugins/user/e_dashboard.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/e107_plugins/user/e_dashboard.php b/e107_plugins/user/e_dashboard.php index b90900123..d7d7113f8 100644 --- a/e107_plugins/user/e_dashboard.php +++ b/e107_plugins/user/e_dashboard.php @@ -57,14 +57,15 @@ class user_dashboard // plugin-folder + '_url' $months = e107::getDate()->terms('month'); - $data['labels'] = array($months[0], //"January", - $months[1], //"February", - $months[2], //"March", - $months[3], //"April", - $months[4], //"May", - $months[5], //"June", - $months[6] //"July" - ); + foreach($months as $month) + { + // We need only the first 6 months for demo. + if (!empty($data['labels']) && count($data['labels']) >= 6) + { + continue; + } + $data['labels'][] = $month; + } $data['datasets'][] = array( 'fillColor' => "rgba(220,220,220,0.5)", 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 09/16] 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]; } From 49f4e1c097cb337500ffc7a3157a1cab2314a365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 11:59:03 +0100 Subject: [PATCH 10/16] Fix for PHP Notice Undefined offset: 0, Line 741 of /e107_core/shortcodes/batch/user_shortcodes.php --- e107_core/shortcodes/batch/user_shortcodes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_core/shortcodes/batch/user_shortcodes.php b/e107_core/shortcodes/batch/user_shortcodes.php index 57269fd21..09efd75da 100644 --- a/e107_core/shortcodes/batch/user_shortcodes.php +++ b/e107_core/shortcodes/batch/user_shortcodes.php @@ -738,7 +738,7 @@ class user_shortcodes extends e_shortcode $cat_name = true; //XXX TEMP Fix. - if($cat_name != FALSE && count($ueFieldList[$catnum])) + if($cat_name != FALSE && isset($ueFieldList[$catnum]) && count($ueFieldList[$catnum])) { $ret .= str_replace("{EXTENDED_NAME}", $key, $EXTENDED_CATEGORY_START); From 170c9592d591e535b7fed88b060b7b64928eeb1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 12:01:09 +0100 Subject: [PATCH 11/16] Fix for PHP Notice Undefined index: user_Miscellaneous, Line 113 of /e107_core/shortcodes/single/user_extended.php --- e107_core/shortcodes/single/user_extended.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/e107_core/shortcodes/single/user_extended.php b/e107_core/shortcodes/single/user_extended.php index 56af0ba83..dc0419ac5 100644 --- a/e107_core/shortcodes/single/user_extended.php +++ b/e107_core/shortcodes/single/user_extended.php @@ -110,6 +110,10 @@ if ($parms[1] == 'text') { + if(!isset($ueStruct['user_'.$parms[0]])) + { + return FALSE; + } $text_val = $ueStruct['user_'.$parms[0]]['user_extended_struct_text']; if($text_val) { From 67511a084f8bc47ad025fc27f66f20f8495995c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 12:03:48 +0100 Subject: [PATCH 12/16] Fix for PHP Notice Undefined index: userjump, Line 670 of /e107_handlers/e107_class.php --- e107_handlers/e107_class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index c64033399..bab439e13 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -667,7 +667,7 @@ class e107 { if(null === $data) { - if(is_object(self::$_registry[$id]) && method_exists(self::$_registry[$id], '__destruct')) + if(isset(self::$_registry[$id]) && is_object(self::$_registry[$id]) && method_exists(self::$_registry[$id], '__destruct')) { self::$_registry[$id]->__destruct(); } From 3f59508061371c8fb344c11a6a5f90ac78c96dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 13:25:23 +0100 Subject: [PATCH 13/16] Fix for PHP Notice Undefined index: subnews_attach_minsize, Line 1274 of /e107_admin/newspost.php --- e107_admin/newspost.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index 248bf8191..c3c22dc99 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -1271,7 +1271,7 @@ class news_admin_ui extends e_admin_ui ".LAN_NEWS_99." - ".$frm->select('subnews_attach_minsize', $imageSizes, $pref['subnews_attach_minsize'], null, LAN_NEWS_100)." + ".$frm->select('subnews_attach_minsize', $imageSizes, varset($pref['subnews_attach_minsize'], null), null, LAN_NEWS_100)." From c2b664fdee6f95fa7916b109b8ba3a0955f843e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 13:28:22 +0100 Subject: [PATCH 14/16] Fix for PHP Notice Undefined index: class, Line 682 of /e107_admin/cpage.php --- e107_admin/cpage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 5fb8d9ed7..2fc69f912 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -679,7 +679,7 @@ class page_admin_ui extends e_admin_ui if(strpos($k,'menu_') === 0) { - $this->fields[$k]['class'] = 'menu-field '.$this->fields[$k]['class']; + $this->fields[$k]['class'] = 'menu-field ' . varset($this->fields[$k]['class'], ''); } $this->fields[$k]['width'] = '13%'; From 6269e8310aa7e30150759346681b16ba7a367111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 13:33:26 +0100 Subject: [PATCH 15/16] Fix for PHP Notice Undefined offset: 0, Line 296 of /e107_handlers/e_customfields_class.php --- e107_handlers/e_customfields_class.php | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/e107_handlers/e_customfields_class.php b/e107_handlers/e_customfields_class.php index ee06cfe12..ba62c8ed5 100644 --- a/e107_handlers/e_customfields_class.php +++ b/e107_handlers/e_customfields_class.php @@ -280,29 +280,27 @@ ".LAN_NAME."".LAN_TITLE."".LAN_TYPE."Params".LAN_TOOLTIP." "; - for ($i = 0; $i <= $this->_field_limit; $i++) + for($i = 0; $i <= $this->_field_limit; $i++) { - $writeParms = array( - // 'class' => 'form-control', + // 'class' => 'form-control', 'useValues' => 1, 'default' => 'blank', - 'data-src' => e_REQUEST_URI, + 'data-src' => e_REQUEST_URI, ); - $parmsWriteParms= array( - 'size' => 'block-level', - 'placeholder' => $this->getCustomFieldPlaceholder($value[$i]['type']) - + $parmsWriteParms = array( + 'size' => 'block-level', + 'placeholder' => isset($value[$i]['type']) ? $this->getCustomFieldPlaceholder($value[$i]['type']) : '', ); - $fieldName = $frm->text($name.'['.$i.'][key]', $value[$i]['key'],30, array('pattern'=>'^[a-z0-9-]*')); - $fieldTitle = $frm->text($name.'['.$i.'][title]',$value[$i]['title'], 80); - $fieldType = $frm->select($name.'['.$i.'][type]',$this->getFieldTypes(),$value[$i]['type'], $writeParms); - $fieldParms = $frm->text($name.'['.$i.'][writeParms]',$value[$i]['writeParms'], 255, $parmsWriteParms); - $fieldHelp = $frm->text($name.'['.$i.'][help]',$value[$i]['help'], 255, array('size'=>'block-level')); - $text .= "".$fieldName."".$fieldTitle."".$fieldType."".$fieldParms."".$fieldHelp.""; + $fieldName = $frm->text($name . '[' . $i . '][key]', varset($value[$i]['key']), 30, array('pattern' => '^[a-z0-9-]*')); + $fieldTitle = $frm->text($name . '[' . $i . '][title]', varset($value[$i]['title']), 80); + $fieldType = $frm->select($name . '[' . $i . '][type]', $this->getFieldTypes(), varset($value[$i]['type']), $writeParms); + $fieldParms = $frm->text($name . '[' . $i . '][writeParms]', varset($value[$i]['writeParms']), 255, $parmsWriteParms); + $fieldHelp = $frm->text($name . '[' . $i . '][help]', varset($value[$i]['help']), 255, array('size' => 'block-level')); + $text .= "" . $fieldName . "" . $fieldTitle . "" . $fieldType . "" . $fieldParms . "" . $fieldHelp . ""; } $text .= ""; From e3621e489f88788a281ec9736bb8f7b604bf431a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sun, 10 Dec 2017 13:37:47 +0100 Subject: [PATCH 16/16] Fix for PHP Notice Use of undefined constant UH_DEBUG - assumed 'UH_DEBUG', Line 896 of /e107_handlers/upload_handler.php --- e107_handlers/upload_handler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_handlers/upload_handler.php b/e107_handlers/upload_handler.php index a6b2f909f..f9dd3445f 100644 --- a/e107_handlers/upload_handler.php +++ b/e107_handlers/upload_handler.php @@ -893,7 +893,7 @@ function get_image_mime($filename, $extended = false) global $pref; $admin_log = e107::getAdminLog(); // Work out maximum allowable file size - if (UH_DEBUG) + if (deftrue('UH_DEBUG')) { $admin_log-> e_log_event(10, __FILE__."|".__FUNCTION__."@".__LINE__, "DEBUG", "Upload Handler test", "File size limits - user set: ".$pref['upload_maxfilesize']." Post_max_size: ".ini_get('post_max_size')." upload_max_size: ".ini_get('upload_max_size'), FALSE, FALSE); @@ -909,7 +909,7 @@ function get_image_mime($filename, $extended = false) if (varset($pref['upload_maxfilesize'], 0) > 0) $max_upload_size = file_size_decode($pref['upload_maxfilesize'], $max_upload_size, 'lt'); } - if (UH_DEBUG) + if (deftrue('UH_DEBUG')) $admin_log-> e_log_event(10, __FILE__."|".__FUNCTION__."@".__LINE__, "DEBUG", "Upload Handler test", "Final max upload size: {$max_upload_size}", FALSE, FALSE); return $max_upload_size;