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()
|
||||
{
|
||||
$this->label = array(E_NOTICE => "Notice", E_WARNING => "Warning", E_DEPRECATED => "Deprecated", E_STRICT => "Strict");
|
||||
$this->color = array(E_NOTICE=> 'info', E_WARNING=>'warning', E_DEPRECATED => 'danger', E_STRICT => 'primary');
|
||||
$this->label = array(E_NOTICE => "Notice", E_WARNING => "Warning", E_DEPRECATED => "Deprecated");
|
||||
$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 is initialized before the current debug level is known
|
||||
@@ -2003,7 +2010,7 @@ class error_handler
|
||||
|
||||
if(!empty($_E107['cli']))
|
||||
{
|
||||
error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
|
||||
error_reporting(E_ALL & ~E_NOTICE);
|
||||
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.
|
||||
@@ -437,6 +440,11 @@ class db_verify
|
||||
*/
|
||||
public function prepareResults($tbl, $selection, $sqlData, $fileData)
|
||||
{
|
||||
if($this->hasSyntaxIssue($fileData))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check field and index data
|
||||
foreach(['field', 'index'] as $type)
|
||||
{
|
||||
|
@@ -954,10 +954,13 @@ class news_front
|
||||
|
||||
$gen = new convert;
|
||||
$sql->select("news_category", "*", "category_id='$category'");
|
||||
$row = $sql->fetch();
|
||||
if($row = $sql->fetch())
|
||||
{
|
||||
extract($row); // still required for the table-render. :(
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($this->action == 'all') // show archive of all news items using list-style template.
|
||||
{
|
||||
$renTypeQry = '';
|
||||
|
Reference in New Issue
Block a user