Various fixes to remove warnings in PHP 8.0

This commit is contained in:
Kijin Sung 2020-12-15 00:18:42 +09:00
parent 9a0bf6d907
commit 49923844b2
36 changed files with 271 additions and 176 deletions

View file

@ -186,7 +186,7 @@ class DBQueryParser extends BaseParser
}
// Check the ON DUPLICATE KEY UPDATE (upsert) flag.
if ($query->type === 'INSERT' && $update_duplicate = self::_getAttributes($xml)['updateduplicate'])
if ($query->type === 'INSERT' && $update_duplicate = self::_getAttributes($xml)['updateduplicate'] ?? false)
{
if (toBool($update_duplicate))
{

View file

@ -435,7 +435,7 @@ function cut_str($string, $cut_size = 0, $tail = '...')
return $string;
}
if($GLOBALS['use_mb_strimwidth'] || function_exists('mb_strimwidth'))
if(isset($GLOBALS['use_mb_strimwidth']) || function_exists('mb_strimwidth'))
{
$GLOBALS['use_mb_strimwidth'] = TRUE;
return mb_strimwidth($string, 0, $cut_size + 4, $tail, 'utf-8');