From 366a0f2040313c657a3463112bcacbf2feac6bab Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sun, 30 Aug 2020 17:33:27 +0200 Subject: [PATCH] Game/worldPosToZonePos * catch DB errors resulting in wrong return type --- includes/game.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/game.php b/includes/game.php index 6f491885..3735d3d1 100644 --- a/includes/game.php +++ b/includes/game.php @@ -264,6 +264,12 @@ class Game if (!$points) // retry: TC counts pre-instance subareas as instance-maps .. which have no map file $points = DB::Aowow()->select($query, $posX, $posX, $posY, $posY, $posX, $posX, $posY, $posY, 0, $mapId, 0, 0, DBSIMPLE_SKIP); + if (!is_array($points)) + { + trigger_error('Game::worldPosToZonePos - dbc query failed', E_USER_ERROR); + return []; + } + return $points; } }