From 465cc393cf2c30a03fe0aee57c366272a1c2f0c9 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 9 Dec 2020 14:08:28 -0800 Subject: [PATCH] Code cleanup --- e107_handlers/application.php | 2 +- e107_handlers/e_thumbnail_class.php | 2 +- e107_handlers/file_class.php | 5 ++++- e107_handlers/media_class.php | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/e107_handlers/application.php b/e107_handlers/application.php index 041b9891f..092bd671c 100644 --- a/e107_handlers/application.php +++ b/e107_handlers/application.php @@ -396,7 +396,7 @@ class eFront $router = new eRouter(); $this->setRouter($router); - + /** @var eResponse $response */ $response = e107::getSingleton('eResponse'); $this->setResponse($response); diff --git a/e107_handlers/e_thumbnail_class.php b/e107_handlers/e_thumbnail_class.php index 0fe81e5ec..c35653599 100644 --- a/e107_handlers/e_thumbnail_class.php +++ b/e107_handlers/e_thumbnail_class.php @@ -243,7 +243,7 @@ class e_thumbnail $this->sendCachedImage($cache_filename, $thumbnfo); // No Cached file found - proceed with image creation. - +file_put_contents(e_BASE."e107_system/thumbnail.log",$this->_src_path."\n", FILE_APPEND); $img = Image::make($this->_src_path); diff --git a/e107_handlers/file_class.php b/e107_handlers/file_class.php index ab2364d9d..e71b925bd 100644 --- a/e107_handlers/file_class.php +++ b/e107_handlers/file_class.php @@ -1056,7 +1056,10 @@ class e_file @set_time_limit(10 * 60); @session_write_close(); @e107_ini_set("max_execution_time", 10 * 60); - while(@ob_end_clean()); // kill all output buffering else it eats server resources + while (ob_get_length() !== false) // destroy all ouput buffering + { + ob_end_clean(); + } @ob_implicit_flush(TRUE); diff --git a/e107_handlers/media_class.php b/e107_handlers/media_class.php index 0b8e923fa..7bbf9de6e 100644 --- a/e107_handlers/media_class.php +++ b/e107_handlers/media_class.php @@ -1276,7 +1276,7 @@ class e_media 'media_author' => USERID, 'media_usedby' => '', 'media_tags' => '', - 'media_dimensions' => $info['img-width']." x ".$info['img-height'] + 'media_dimensions' => (isset($info['img-width']) && isset($info['img-height'])) ? $info['img-width']." x ".$info['img-height'] : '' ); }