mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 15:16:30 +02:00
Issue #5443 - PHP 8.4 fixes.
This commit is contained in:
13
class2.php
13
class2.php
@@ -1981,8 +1981,15 @@ class error_handler
|
|||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
$this->label = array(E_NOTICE => "Notice", E_WARNING => "Warning", E_DEPRECATED => "Deprecated", E_STRICT => "Strict");
|
$this->label = array(E_NOTICE => "Notice", E_WARNING => "Warning", E_DEPRECATED => "Deprecated");
|
||||||
$this->color = array(E_NOTICE=> 'info', E_WARNING=>'warning', E_DEPRECATED => 'danger', E_STRICT => 'primary');
|
$this->color = array(E_NOTICE=> 'info', E_WARNING=>'warning', E_DEPRECATED => 'danger');
|
||||||
|
|
||||||
|
if (version_compare(PHP_VERSION, '8.4', '<'))
|
||||||
|
{
|
||||||
|
$this->label[E_STRICT] = "Strict";
|
||||||
|
$this->color[E_STRICT] = 'primary';
|
||||||
|
}
|
||||||
|
|
||||||
$this->docroot = e_ROOT; // dirname(realpath(__FILE__)).DIRECTORY_SEPARATOR;
|
$this->docroot = e_ROOT; // dirname(realpath(__FILE__)).DIRECTORY_SEPARATOR;
|
||||||
|
|
||||||
// This is initialized before the current debug level is known
|
// This is initialized before the current debug level is known
|
||||||
@@ -2003,7 +2010,7 @@ class error_handler
|
|||||||
|
|
||||||
if(!empty($_E107['cli']))
|
if(!empty($_E107['cli']))
|
||||||
{
|
{
|
||||||
error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
|
error_reporting(E_ALL & ~E_NOTICE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -425,7 +425,10 @@ class db_verify
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hasSyntaxIssue($sqlFileData): bool
|
||||||
|
{
|
||||||
|
return false; // TODO check syntax for errrors.
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $tbl table name without prefix.
|
* @param string $tbl table name without prefix.
|
||||||
@@ -437,6 +440,11 @@ class db_verify
|
|||||||
*/
|
*/
|
||||||
public function prepareResults($tbl, $selection, $sqlData, $fileData)
|
public function prepareResults($tbl, $selection, $sqlData, $fileData)
|
||||||
{
|
{
|
||||||
|
if($this->hasSyntaxIssue($fileData))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Check field and index data
|
// Check field and index data
|
||||||
foreach(['field', 'index'] as $type)
|
foreach(['field', 'index'] as $type)
|
||||||
{
|
{
|
||||||
|
@@ -954,8 +954,11 @@ class news_front
|
|||||||
|
|
||||||
$gen = new convert;
|
$gen = new convert;
|
||||||
$sql->select("news_category", "*", "category_id='$category'");
|
$sql->select("news_category", "*", "category_id='$category'");
|
||||||
$row = $sql->fetch();
|
if($row = $sql->fetch())
|
||||||
extract($row); // still required for the table-render. :(
|
{
|
||||||
|
extract($row); // still required for the table-render. :(
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->action == 'all') // show archive of all news items using list-style template.
|
if ($this->action == 'all') // show archive of all news items using list-style template.
|
||||||
|
Reference in New Issue
Block a user