PHP/Compat

* remove sources of deprecation warnings. Mostly dynamic creation of object properties.
 * some string function no longer accept null as string
This commit is contained in:
Sarjuuk
2024-07-03 14:55:33 +02:00
parent 05c036bd9f
commit 2bd588045a
12 changed files with 46 additions and 47 deletions

View File

@@ -8,9 +8,10 @@ class AreaTriggerList extends BaseType
{
use spawnHelper;
public static $type = Type::AREATRIGGER;
public static $brickFile = 'areatrigger';
public static $dataTable = '?_areatrigger';
public static $type = Type::AREATRIGGER;
public static $brickFile = 'areatrigger';
public static $dataTable = '?_areatrigger';
public static $contribute = CONTRIBUTE_CO;
protected $queryBase = 'SELECT a.*, a.id AS ARRAY_KEY FROM ?_areatrigger a';
protected $queryOpts = array(

View File

@@ -10,6 +10,8 @@ class ArenaTeamList extends BaseType
private $rankOrder = [];
public static $contribute = CONTRIBUTE_NONE;
public function getListviewData()
{
$data = [];

View File

@@ -16,9 +16,10 @@ class GuideList extends BaseType
GUIDE_STATUS_ARCHIVED => '#FFD100'
);
public static $type = Type::GUIDE;
public static $brickFile = 'guide';
public static $dataTable = '?_guides';
public static $type = Type::GUIDE;
public static $brickFile = 'guide';
public static $dataTable = '?_guides';
public static $contribute = CONTRIBUTE_CO;
private $article = [];
private $jsGlobals = [];

View File

@@ -8,6 +8,8 @@ class GuildList extends BaseType
{
use profilerHelper, listviewHelper;
public static $contribute = CONTRIBUTE_NONE;
public function getListviewData()
{
$this->getGuildScores();

View File

@@ -8,6 +8,8 @@ class ProfileList extends BaseType
{
use profilerHelper, listviewHelper;
public static $contribute = CONTRIBUTE_NONE;
public function getListviewData($addInfo = 0, array $reqCols = [])
{
$data = [];
@@ -35,7 +37,7 @@ class ProfileList extends BaseType
'talenttree3' => $this->getField('talenttree3'),
'talentspec' => $this->getField('activespec') + 1, // 0 => 1; 1 => 2
'achievementpoints' => $this->getField('achievementpoints'),
'guild' => '$"'.str_replace ('"', '', $this->curTpl['guildname']).'"',// force this to be a string
'guild' => $this->curTpl['guildname'] ? '$"'.str_replace ('"', '', $this->curTpl['guildname']).'"' : '', // force this to be a string
'guildrank' => $this->getField('guildrank'),
'realm' => Profiler::urlize($this->getField('realmName'), true),
'realmname' => $this->getField('realmName'),