From a7f5784aeb78844013ef25f181e3817d0d2c54cc Mon Sep 17 00:00:00 2001 From: Aleksandr Yakovlev Date: Sun, 2 Jun 2024 15:57:11 +0600 Subject: [PATCH] Close off deprecated warnings --- framework/classes/engine/Action.class.php | 4 ++-- framework/classes/modules/session/Session.class.php | 2 +- framework/include/function.php | 2 +- framework/libs/application/ConfigSimple/Config.class.php | 2 +- framework/libs/vendor/DbSimple/Database.php | 4 +++- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/framework/classes/engine/Action.class.php b/framework/classes/engine/Action.class.php index ba85e02..777a0c7 100644 --- a/framework/classes/engine/Action.class.php +++ b/framework/classes/engine/Action.class.php @@ -237,7 +237,7 @@ abstract class Action extends LsObject Router::SetActionEvent($this->sCurrentEvent); } foreach ($this->aRegisterEvent as $aEvent) { - if (preg_match($aEvent['preg'], $this->sCurrentEvent, $aMatch)) { + if (preg_match($aEvent['preg'], (string) $this->sCurrentEvent, $aMatch)) { $this->aParamsEventMatch['event'] = $aMatch; $this->aParamsEventMatch['params'] = array(); foreach ($aEvent['params_preg'] as $iKey => $sParamPreg) { @@ -526,4 +526,4 @@ abstract class Action extends LsObject */ abstract protected function RegisterEvent(); -} \ No newline at end of file +} diff --git a/framework/classes/modules/session/Session.class.php b/framework/classes/modules/session/Session.class.php index 0f99b39..95b416f 100644 --- a/framework/classes/modules/session/Session.class.php +++ b/framework/classes/modules/session/Session.class.php @@ -58,7 +58,7 @@ class ModuleSession extends Module { session_name(Config::Get('sys.session.name')); session_set_cookie_params( - Config::Get('sys.session.timeout'), + (int) Config::Get('sys.session.timeout'), Config::Get('sys.session.path'), Config::Get('sys.session.host'), Config::Get('sys.session.secure'), diff --git a/framework/include/function.php b/framework/include/function.php index 17d27ba..1fc86c1 100644 --- a/framework/include/function.php +++ b/framework/include/function.php @@ -457,7 +457,7 @@ if (!function_exists('class_alias')) { function func_underscore($sStr) { - return strtolower(preg_replace('/([^A-Z])([A-Z])/', "$1_$2", $sStr)); + return strtolower(preg_replace('/([^A-Z])([A-Z])/', "$1_$2", (string) $sStr)); } function func_camelize($sStr) diff --git a/framework/libs/application/ConfigSimple/Config.class.php b/framework/libs/application/ConfigSimple/Config.class.php index a151056..9a3ffdb 100644 --- a/framework/libs/application/ConfigSimple/Config.class.php +++ b/framework/libs/application/ConfigSimple/Config.class.php @@ -214,7 +214,7 @@ class Config if (is_string($cfg) and strpos($cfg, '___') !== false) { if (preg_match_all('~___([\S|\.]+)___~U', $cfg, $aMatch, PREG_SET_ORDER)) { foreach ($aMatch as $aItem) { - $cfg = str_replace('___' . $aItem[1] . '___', Config::Get($aItem[1], $sInstance), $cfg); + $cfg = str_replace('___' . $aItem[1] . '___', (string) Config::Get($aItem[1], $sInstance), $cfg); } } } diff --git a/framework/libs/vendor/DbSimple/Database.php b/framework/libs/vendor/DbSimple/Database.php index 88acd61..36ccbd2 100755 --- a/framework/libs/vendor/DbSimple/Database.php +++ b/framework/libs/vendor/DbSimple/Database.php @@ -101,7 +101,9 @@ abstract class DbSimple_Database extends DbSimple_LastError /** * Protected methods */ - protected $dsn; + protected $dsn; + protected $attributes; + protected $_lastQuery; public function getDns() {