Update WorkorderTenantConfigModel.php

This commit is contained in:
Luca Haid
2025-09-02 08:41:00 +00:00
parent 06760e40f6
commit 38f8eb55e7

View File

@@ -25,7 +25,8 @@ class WorkorderTenantConfigModel extends TTCrudBaseModel {
JOIN `$dbName`.`Preorder` p ON pc.id = p.preordercampaign_id
WHERE p.id = '$preorderId' LIMIT 1";
$row = $db->query($sql)?->fetch_assoc();
$result = $db->query($sql);
$row = $result ? $result->fetch_assoc() : null;
return $row ? new self($row) : null;
}}
}}