From 998f2f592b88ef2043de8d51c0c5a89183b3d45d Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 2 Jun 2016 08:38:39 -0700 Subject: [PATCH] Check added to thumb.php in case of UTF8-BOM in e107_config.php or any other output which could corrupt images. --- class2.php | 2 +- e107_handlers/mysql_class.php | 2 +- thumb.php | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/class2.php b/class2.php index 11d88a69a..21d3ec376 100644 --- a/class2.php +++ b/class2.php @@ -405,7 +405,7 @@ e107::getSingleton('e107_traffic'); // We start traffic counting ASAP //DEPRECATED, BC, $e107->sql caught by __get() $sql = e107::getDb(); //TODO - find & replace $sql, $e107->sql -$sql->db_SetErrorReporting(FALSE); +$sql->db_SetErrorReporting(false); $sql->db_Mark_Time('SQL Connect'); $merror=$sql->db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb); diff --git a/e107_handlers/mysql_class.php b/e107_handlers/mysql_class.php index 6cc08e010..67ed5e5c8 100644 --- a/e107_handlers/mysql_class.php +++ b/e107_handlers/mysql_class.php @@ -1639,7 +1639,7 @@ class e_db_mysql /** * @return void - * @param unknown $mode + * @param bool $mode * @desc Enter description here... * @access private */ diff --git a/thumb.php b/thumb.php index 8872cf60d..c4bfea673 100644 --- a/thumb.php +++ b/thumb.php @@ -49,7 +49,7 @@ class e_thumbpage { private $_debug = false; - private $_cache = true; + private $_cache = false; /** * Page request @@ -92,6 +92,7 @@ class e_thumbpage $mySQLprefix = ''; // Config + include($self.'/e107_config.php'); // support early include feature @@ -100,6 +101,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 + $tmp = $self.'/'.$HANDLERS_DIRECTORY; //Core functions - now API independent