mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
PHP 8 avoid possible error.
This commit is contained in:
11
thumb.php
11
thumb.php
@@ -21,10 +21,10 @@
|
|||||||
* On-the-fly thumbnail generator
|
* On-the-fly thumbnail generator
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('e107_INIT', true);
|
const e107_INIT = true;
|
||||||
|
|
||||||
|
|
||||||
function thumbExceptionHandler(Exception $exception)
|
function thumbExceptionHandler(Throwable $exception)
|
||||||
{
|
{
|
||||||
http_response_code(500);
|
http_response_code(500);
|
||||||
echo "Fatal Thumbnail Error\n";
|
echo "Fatal Thumbnail Error\n";
|
||||||
@@ -93,7 +93,7 @@ class e_thumbpage
|
|||||||
include($self.DIRECTORY_SEPARATOR.'e107_config.php');
|
include($self.DIRECTORY_SEPARATOR.'e107_config.php');
|
||||||
|
|
||||||
// support early include feature
|
// support early include feature
|
||||||
if(isset($CLASS2_INCLUDE) && !empty($CLASS2_INCLUDE))
|
if(!empty($CLASS2_INCLUDE))
|
||||||
{
|
{
|
||||||
require_once(realpath(__DIR__ .'/'.$CLASS2_INCLUDE));
|
require_once(realpath(__DIR__ .'/'.$CLASS2_INCLUDE));
|
||||||
}
|
}
|
||||||
@@ -131,8 +131,7 @@ class e_thumbpage
|
|||||||
'SYSTEM_DIRECTORY',
|
'SYSTEM_DIRECTORY',
|
||||||
'CORE_DIRECTORY'
|
'CORE_DIRECTORY'
|
||||||
);
|
);
|
||||||
// $sql_info = array(); //compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix', 'mySQLcharset');
|
|
||||||
//e107::getInstance()->initCore($e107_paths, $self, $sql_info, varset($e107_CONFIG, array()));
|
|
||||||
$e107 = e107::getInstance();
|
$e107 = e107::getInstance();
|
||||||
|
|
||||||
$e107->site_path = substr(md5($mySQLdefaultdb.".".$mySQLprefix),0,10);
|
$e107->site_path = substr(md5($mySQLdefaultdb.".".$mySQLprefix),0,10);
|
||||||
@@ -148,7 +147,7 @@ class e_thumbpage
|
|||||||
unset($tmp, $self);
|
unset($tmp, $self);
|
||||||
$e107->set_urls(false);
|
$e107->set_urls(false);
|
||||||
// basic Admin area detection - required for proper path parsing
|
// basic Admin area detection - required for proper path parsing
|
||||||
define('ADMIN', strpos(e_SELF, ($e107->getFolder('admin')) !== false || strpos(e_PAGE, 'admin') !== false));
|
define('ADMIN', strpos(e_SELF, (e107::getFolder('admin')) != false || strpos(e_PAGE, 'admin') !== false));
|
||||||
|
|
||||||
// Next function call maintains behavior identical to before; might not be needed
|
// Next function call maintains behavior identical to before; might not be needed
|
||||||
// See https://github.com/e107inc/e107/issues/3033
|
// See https://github.com/e107inc/e107/issues/3033
|
||||||
|
Reference in New Issue
Block a user