Close off deprecated warnings

This commit is contained in:
Alexander Yakovlev 2024-06-02 15:57:11 +06:00
parent 201f137caa
commit a7f5784aeb
Signed by: oreolek
GPG key ID: 8269E24B4008E32A
5 changed files with 8 additions and 6 deletions

View file

@ -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();
}
}

View file

@ -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'),

View file

@ -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)

View file

@ -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);
}
}
}

View file

@ -101,7 +101,9 @@ abstract class DbSimple_Database extends DbSimple_LastError
/**
* Protected methods
*/
protected $dsn;
protected $dsn;
protected $attributes;
protected $_lastQuery;
public function getDns()
{