mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix deprecation warnings in PHP 8.2
This commit is contained in:
parent
f7f20a0825
commit
e0a041bb3d
5 changed files with 10 additions and 7 deletions
|
|
@ -44,7 +44,7 @@ class Validator
|
|||
* custom message list
|
||||
* @var array
|
||||
*/
|
||||
var $_messages;
|
||||
var $_message;
|
||||
|
||||
/**
|
||||
* custom field name list
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
* @package /classes/xml
|
||||
* @version 0.1
|
||||
*/
|
||||
#[AllowDynamicProperties]
|
||||
class Xml_Node_
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -185,6 +185,7 @@ function clean_path($path)
|
|||
*/
|
||||
function escape($str, $double_escape = true, $except_lang_code = false)
|
||||
{
|
||||
$str = (string)$str;
|
||||
if ($except_lang_code && preg_match('/^\$user_lang->userLang[0-9]+$/', $str))
|
||||
{
|
||||
return $str;
|
||||
|
|
@ -204,7 +205,7 @@ function escape($str, $double_escape = true, $except_lang_code = false)
|
|||
*/
|
||||
function escape_css($str)
|
||||
{
|
||||
return preg_replace('/[^a-zA-Z0-9_.#\/-]/', '', $str);
|
||||
return preg_replace('/[^a-zA-Z0-9_.#\/-]/', '', (string)$str);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -229,7 +230,7 @@ function escape_js($str)
|
|||
*/
|
||||
function escape_sqstr($str)
|
||||
{
|
||||
return str_replace(array('\\0', '\\"'), array('', '"'), addslashes($str));
|
||||
return str_replace(array('\\0', '\\"'), array('', '"'), addslashes((string)$str));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -241,7 +242,7 @@ function escape_sqstr($str)
|
|||
*/
|
||||
function escape_dqstr($str)
|
||||
{
|
||||
return str_replace(array('\\0', "\\'", '$'), array('', "'", '\\$'), addslashes($str));
|
||||
return str_replace(array('\\0', "\\'", '$'), array('', "'", '\\$'), addslashes((string)$str));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -258,6 +259,7 @@ function escape_dqstr($str)
|
|||
function explode_with_escape($delimiter, $str, $limit = 0, $escape_char = '\\')
|
||||
{
|
||||
if ($limit < 1) $limit = 0;
|
||||
$str = (string)$str;
|
||||
$result = array();
|
||||
$split = preg_split('/(?<!' . preg_quote($escape_char, '/') . ')' . preg_quote($delimiter, '/') . '/', $str, $limit);
|
||||
foreach ($split as $piece)
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ class MemberAdminModel extends Member
|
|||
case 'disable' : $args->is_denied = 'Y';break;
|
||||
}
|
||||
|
||||
$search_target = trim(Context::get('search_target'));
|
||||
$search_keyword = trim(Context::get('search_keyword'));
|
||||
$search_target = trim(Context::get('search_target') ?? '');
|
||||
$search_keyword = trim(Context::get('search_keyword') ?? '');
|
||||
|
||||
if($search_target && $search_keyword)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -498,7 +498,7 @@ class MemberModel extends Member
|
|||
{
|
||||
foreach($extra_vars as $key => $val)
|
||||
{
|
||||
if(!is_array($val) && !is_object($val) && strpos($val, '|@|') !== FALSE)
|
||||
if(!is_null($val) && !is_array($val) && !is_object($val) && strpos($val, '|@|') !== FALSE)
|
||||
{
|
||||
$val = explode('|@|', $val);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue