From 868c067fe11999791eeab194f5e44f7c13a7213d Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 6 Dec 2016 19:26:52 -0800 Subject: [PATCH] Removed PHP warning. --- e107_admin/newspost.php | 9 ++++++--- e107_handlers/media_class.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index 0d0c8a4b4..3ab247190 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -739,10 +739,13 @@ class news_admin_ui extends e_admin_ui foreach($this->addons as $plug=>$config) { - foreach($config['fields'] as $field=>$tmp) + if(!empty($config['fields'])) { - $newOrder[] = "x_".$plug."_".$field; - // echo $field; + foreach($config['fields'] as $field=>$tmp) + { + $newOrder[] = "x_".$plug."_".$field; + // echo $field; + } } } diff --git a/e107_handlers/media_class.php b/e107_handlers/media_class.php index 34b042a44..43a1ae700 100644 --- a/e107_handlers/media_class.php +++ b/e107_handlers/media_class.php @@ -1107,7 +1107,7 @@ class e_media } $img_data = $this->mediaData($oldpath); // Basic File Info only - + if(!$typePath = $this->getPath($img_data['media_type'], $uploadPath)) {