1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 12:48:26 +02:00

PHP8 Fix.

This commit is contained in:
Cameron
2021-02-06 09:21:54 -08:00
parent 49932534da
commit 10ca7acdd5
2 changed files with 17 additions and 17 deletions

View File

@@ -26,11 +26,11 @@ if (!defined('e107_INIT')) { exit; }
class e_bbcode class e_bbcode
{ {
var $bbList; // Caches the file contents for each bbcode processed private $bbList; // Caches the file contents for each bbcode processed
var $bbLocation = array(); // Location for each file - 'core' or a plugin name private $bbLocation = array(); // Location for each file - 'core' or a plugin name
var $preProcess = FALSE; // Set when processing bbcodes prior to saving private $preProcess = false; // Set when processing bbcodes prior to saving
var $core_bb = array(); private $core_bb = array();
var $class = FALSE; private $class = false;
private $resizePrefs = array(); private $resizePrefs = array();
function __construct() function __construct()
@@ -855,7 +855,7 @@ class e_bbcode
$text = $tp->cleanHtml($text); $text = $tp->cleanHtml($text);
$tp->init(); // reset to default; // FIXME needs to reset the above values to default. $tp->init(); // reset to default;
$text = str_replace("<!-- bbcode-html-start -->","[html]",$text); $text = str_replace("<!-- bbcode-html-start -->","[html]",$text);
$text = str_replace("<!-- bbcode-html-end -->","[/html]",$text); $text = str_replace("<!-- bbcode-html-end -->","[/html]",$text);

View File

@@ -31,7 +31,7 @@ class redirection
protected $self_exceptions = array(); protected $self_exceptions = array();
/** /**
* List of pages to not check against e_PAGE * List of pages to not check against defset('e_PAGE')
* *
* @var array * @var array
*/ */
@@ -75,7 +75,7 @@ class redirection
{ {
if(!$url) if(!$url)
{ {
// e_SELF, e_PAGE and e_QUERY not set early enough when in e_SINGLE_ENTRY mod // e_SELF, defset('e_PAGE') and e_QUERY not set early enough when in e_SINGLE_ENTRY mod
if(defset('e_SELF') && in_array(e_SELF, $this->self_exceptions)) if(defset('e_SELF') && in_array(e_SELF, $this->self_exceptions))
{ {
return; return;
@@ -215,7 +215,7 @@ class redirection
return; return;
} }
if(e107::getPref('maintainance_flag') && defset('e_PAGE') != 'secure_img_render.php') if(e107::getPref('maintainance_flag') && defset('e_PAGE') !== 'secure_img_render.php')
{ {
// if not admin // if not admin
@@ -260,7 +260,7 @@ class redirection
{ {
return; return;
} }
if(strpos(e_PAGE, 'admin') !== FALSE) if(strpos(defset('e_PAGE'), 'admin') !== false)
{ {
return; return;
} }
@@ -268,14 +268,14 @@ class redirection
{ {
return; return;
} }
if(in_array(e_PAGE, $this->page_exceptions)) if(in_array(defset('e_PAGE'), $this->page_exceptions))
{ {
return; return;
} }
foreach (e107::getPref('membersonly_exceptions') as $val) foreach (e107::getPref('membersonly_exceptions') as $val)
{ {
$srch = trim($val); $srch = trim($val);
if(strpos(e_SELF, $srch) !== FALSE) if(strpos(e_SELF, $srch) !== false)
{ {
return; return;
} }
@@ -283,7 +283,7 @@ class redirection
/* /*
echo "e_SELF=".e_SELF; echo "e_SELF=".e_SELF;
echo "<br />e_PAGE=".e_PAGE; echo "<br />defset('e_PAGE')=".defset('e_PAGE');
print_a( $this->self_exceptions); print_a( $this->self_exceptions);
print_a($this->page_exceptions); print_a($this->page_exceptions);
*/ */
@@ -374,12 +374,12 @@ class redirection
if(defset('e_DEBUG') === 'redirect') if(deftrue('e_DEBUG_REDIRECT'))
{ {
$error = debug_backtrace(); $error = debug_backtrace();
$message = "URL: ".$url."\nFile: ".$error[1]['file']."\nLine: ".$error[1]['line']."\nClass: ".$error[1]['class']."\nFunction: ".$error[1]['function']."\n\n"; $message = "URL: ".$url."\nFile: ".$error[1]['file']."\nLine: ".$error[1]['line']."\nClass: ".$error[1]['class']."\nFunction: ".$error[1]['function']."\n\n";
e107::getLog()->addDebug($message, true); e107::getLog()->addDebug($message);
echo "Debug active"; echo "Debug active";
print_a($message); print_a($message);
echo "Go to : <a href='".$url."'>".$url."</a>"; echo "Go to : <a href='".$url."'>".$url."</a>";
@@ -393,8 +393,8 @@ class redirection
} }
if($preventCache) if($preventCache)
{ {
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0', true); header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT', true); header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
} }
// issue #3179 redirect with response code >= 400 doesn't work. Only response codes below 400. // issue #3179 redirect with response code >= 400 doesn't work. Only response codes below 400.
if(null === $http_response_code || $http_response_code >= 400) if(null === $http_response_code || $http_response_code >= 400)