From 0655cb96fd6ddcd0e73b59c4bfcb5c1b9d1fa377 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 13 Mar 2016 01:16:37 -0800 Subject: [PATCH] PHP Notice Removal --- e107_admin/cron.php | 10 ++++++++-- e107_handlers/form_handler.php | 5 +++++ e107_plugins/tinymce4/plugins/e107/parser.php | 5 +++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/e107_admin/cron.php b/e107_admin/cron.php index 2fa2a12a2..6edcb3f65 100644 --- a/e107_admin/cron.php +++ b/e107_admin/cron.php @@ -343,8 +343,14 @@ class cron_admin_ui extends e_admin_ui $mes = e107::getMessage(); $frm = e107::getForm(); - - $lastload = intval(@file_get_contents(e_CACHE.'cronLastLoad.php')); + if(file_exists(e_CACHE.'cronLastLoad.php')) + { + $lastload = intval(@file_get_contents(e_CACHE.'cronLastLoad.php')); + } + else + { + $lastload = 0; + } $ago = (time() - $lastload); diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 6c8396c56..27327787f 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -2063,6 +2063,11 @@ class e_form $text = ''; + if(empty($option_array)) + { + return $this->option('',''); + } + foreach ($option_array as $value => $label) { if(is_array($label)) diff --git a/e107_plugins/tinymce4/plugins/e107/parser.php b/e107_plugins/tinymce4/plugins/e107/parser.php index ec4011164..768bf148b 100644 --- a/e107_plugins/tinymce4/plugins/e107/parser.php +++ b/e107_plugins/tinymce4/plugins/e107/parser.php @@ -302,7 +302,8 @@ TEMPL; $style = vartrue($img['style']) ? ' style="'.$img['style'].'"' : ''; $class = vartrue($img['class']) ? ' class="'.$img['class'].'"' : ''; $alt = vartrue($img['alt']) ? ' alt="'.$img['alt'].'"' : ''; - $title = vartrue($img['title']) ? ' title="'.$img['title'].'"' : ''; + $title = vartrue($img['title']) ? ' title="'.$img['title'].'"' : ''; + $srcset = vartrue($img['srcset']) ? 'srcset="'.$img['srcset'].'"' : ''; $qr = $this->thumbUrlDecode($img['src']); @@ -315,7 +316,7 @@ TEMPL; $qr['ebase'] = true; $src = e107::getParser()->thumbUrl($qr['src'],$qr); - $replacement = ''; + $replacement = ''; $text = preg_replace($regexp, $replacement, $text);