Fixed PHP 8 compatibility issues

This commit is contained in:
vishalsingh.qlo325
2025-06-03 16:18:16 +05:30
parent b5e458e583
commit da49d2e262
9 changed files with 22 additions and 19 deletions

View File

@@ -1107,12 +1107,12 @@ class ToolsCore
*
* @see error_log()
* @param mixed $object
* @param int|null $message_type
* @param int $message_type
* @param string|null $destination
* @param string|null $extra_headers
* @return bool
*/
public static function error_log($object, $message_type = null, $destination = null, $extra_headers = null)
public static function error_log($object, $message_type = 0, $destination = null, $extra_headers = null)
{
return error_log(print_r($object, true), $message_type, $destination, $extra_headers);
}

View File

@@ -2826,6 +2826,11 @@ class AdminControllerCore extends Controller
$helper->actions = $this->actions;
}
// For each action, try to add the corresponding skip elements listAdd commentMore actions
$helper->list_skip_actions = $this->list_skip_actions;
$helper->orderBy = $this->_orderBy;
$helper->orderWay = $this->_orderWay;
$this->helper = $helper;
}

View File

@@ -28,6 +28,7 @@
* @TODO Move undeclared variables and methods to this (base) class: $errors, $layout, checkLiveEditAccess, etc.
* @since 1.5.0
*/
#[\AllowDynamicProperties]
abstract class ControllerCore
{
/** @var Context */

View File

@@ -602,11 +602,6 @@ class HelperListCore extends Helper
$total_pages = max(1, ceil($this->listTotal / $pagination));
$identifier = Tools::getIsset($this->identifier) ? '&'.$this->identifier.'='.(int)Tools::getValue($this->identifier) : '';
$order = '';
if (Tools::getIsset($this->table.'Orderby')) {
$order = '&'.$this->table.'Orderby='.urlencode($this->orderBy).'&'.$this->table.'Orderway='.urlencode(strtolower($this->orderWay));
}
$action = $this->currentIndex.$identifier.'&token='.$token.'#'.$this->list_id;
/* Determine current page number */