From cfbd9c85fb900818380717d105acaed69652be4b Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 19 Dec 2016 13:49:39 -0800 Subject: [PATCH] Performance improvement for thumb.php --- thumb.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/thumb.php b/thumb.php index 2821daf07..285bd5dc0 100644 --- a/thumb.php +++ b/thumb.php @@ -27,6 +27,7 @@ define('e107_INIT', true); // error_reporting(E_ALL); + error_reporting(0); // suppress all errors or image will be corrupted. ini_set('gd.jpeg_ignore_warning', 1); //require_once './e107_handlers/benchmark.php'; @@ -101,7 +102,8 @@ class e_thumbpage require_once(realpath(dirname(__FILE__).'/'.$CLASS2_INCLUDE)); } - ob_clean(); // Precaution - clearout utf-8 BOM or any other garbage in e107_config.php + + ob_end_clean(); // Precaution - clearout utf-8 BOM or any other garbage in e107_config.php $tmp = $self.'/'.$HANDLERS_DIRECTORY; @@ -292,6 +294,8 @@ class e_thumbpage // Send required headers //$this->sendHeaders($thumbnfo); + + @readfile(e_CACHE_IMAGE.$fname); //$bench->end()->logResult('thumb.php', $_GET['src'].' - retrieve cache');