mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 14:52:24 +09:00
Various fixes to improve PHP 8.0 compatibility
- XmlParser 클래스가 PHP 내장 클래스가 되어버려서 XeXmlParser로 변경 - 함수나 파라미터의 형태가 맞지 않아서 치명적인 오류 나는 곳 수정 - undefined 변수 및 배열 키 다수 수정 (치명적인 오류는 아님) - 계속 수정중...
This commit is contained in:
parent
90084efd75
commit
8c161bc28d
38 changed files with 136 additions and 100 deletions
|
|
@ -836,6 +836,10 @@ class DB
|
|||
$dbtype = $matches[1];
|
||||
$size = $matches[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
$size = '';
|
||||
}
|
||||
$xetype = Parsers\DBTableParser::getXEType($dbtype, $size ?: '');
|
||||
|
||||
// Return the result as an object.
|
||||
|
|
|
|||
|
|
@ -528,6 +528,8 @@ class Query extends VariableBase
|
|||
{
|
||||
return '';
|
||||
}
|
||||
$page = 0;
|
||||
$offset = 0;
|
||||
|
||||
// Get the offset from the page or offset variable.
|
||||
if ($navigation->page)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class VariableBase
|
|||
$value = '(' . $this->getQueryString($prefix, $args) . ')';
|
||||
$params = $this->getQueryParams();
|
||||
}
|
||||
elseif ($this->var && Query::isValidVariable($args[$this->var], $this instanceof ColumnWrite))
|
||||
elseif ($this->var && Query::isValidVariable($args[$this->var] ?? null, $this instanceof ColumnWrite))
|
||||
{
|
||||
if ($args[$this->var] instanceof EmptyString || $args[$this->var] instanceof NullValue)
|
||||
{
|
||||
|
|
@ -285,7 +285,7 @@ class VariableBase
|
|||
*/
|
||||
public function getValue(array $args)
|
||||
{
|
||||
if ($this->var && Query::isValidVariable($args[$this->var], $this instanceof ColumnWrite))
|
||||
if ($this->var && Query::isValidVariable($args[$this->var] ?? null, $this instanceof ColumnWrite))
|
||||
{
|
||||
if ($args[$this->var] === '')
|
||||
{
|
||||
|
|
@ -321,7 +321,7 @@ class VariableBase
|
|||
public function getDefaultValue()
|
||||
{
|
||||
// Get the current column name.
|
||||
$column = $this instanceof ColumnWrite ? $this->name : $this->column;
|
||||
$column = $this instanceof ColumnWrite ? $this->name : ($this->column ?? null);
|
||||
|
||||
// If the default value is a column name, escape it.
|
||||
if (strpos($this->default, '.') !== false && Query::isValidColumnName($this->default))
|
||||
|
|
@ -382,7 +382,7 @@ class VariableBase
|
|||
// Don't apply a filter if there is no variable.
|
||||
$column = $this instanceof ColumnWrite ? $this->name : $this->column;
|
||||
$filter = isset($this->filter) ? $this->filter : '';
|
||||
if (strval($value) === '')
|
||||
if (!is_array($value) && strval($value) === '')
|
||||
{
|
||||
$filter = '';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,7 +146,8 @@ class Router
|
|||
$prefix_type = 'mid';
|
||||
|
||||
// Find the module associated with this prefix.
|
||||
$action_info = self::_getActionInfoByPrefix($prefix, $module_name = '');
|
||||
$module_name = '';
|
||||
$action_info = self::_getActionInfoByPrefix($prefix, $module_name);
|
||||
if ($action_info === false)
|
||||
{
|
||||
$action_info = self::_getActionInfoByModule($prefix);
|
||||
|
|
|
|||
|
|
@ -963,7 +963,7 @@ class Session
|
|||
public static function getValidityInfo($member_srl)
|
||||
{
|
||||
$member_srl = intval($member_srl);
|
||||
$validity_info = Cache::get(sprintf('session:validity_info:%d', $member_srl), $invalid_before);
|
||||
$validity_info = Cache::get(sprintf('session:validity_info:%d', $member_srl));
|
||||
if ($validity_info)
|
||||
{
|
||||
return $validity_info;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue