mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Page/Achievement
* catch fatal error for achievements without criteria
This commit is contained in:
@@ -259,9 +259,13 @@ class AchievementPage extends GenericPage
|
|||||||
$scripts = [];
|
$scripts = [];
|
||||||
|
|
||||||
// serverside extra-Data
|
// serverside extra-Data
|
||||||
$crtIds = array_column($this->subject->getCriteria(), 'id');
|
if ($crtIds = array_column($this->subject->getCriteria(), 'id'))
|
||||||
|
{
|
||||||
Util::checkNumeric($crtIds);
|
Util::checkNumeric($crtIds);
|
||||||
$crtExtraData = DB::World()->select('SELECT criteria_id AS ARRAY_KEY, type AS ARRAY_KEY2, value1, value2, ScriptName FROM achievement_criteria_data WHERE criteria_id IN (?a)', $crtIds);
|
$crtExtraData = DB::World()->select('SELECT criteria_id AS ARRAY_KEY, type AS ARRAY_KEY2, value1, value2, ScriptName FROM achievement_criteria_data WHERE criteria_id IN (?a)', $crtIds);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$crtExtraData = [];
|
||||||
|
|
||||||
foreach ($this->subject->getCriteria() as $i => $crt)
|
foreach ($this->subject->getCriteria() as $i => $crt)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user