обработка ошибки подключения к базе

This commit is contained in:
lopar 2020-07-06 00:31:50 +03:00
parent 794570171d
commit 484b2e4f8a

View File

@ -21,9 +21,11 @@ class EffectsModel
*/ */
public function getHideUserInfoStatus() public function getHideUserInfoStatus()
{ {
while ($row = $this->DB->fetch_object()) { if ($this->DB) {
if ($row->type == self::EFFECT_HIDEUSERINFO) { while ($row = $this->DB->fetch_object()) {
return $row->time; if ($row->type == self::EFFECT_HIDEUSERINFO) {
return $row->time;
}
} }
} }
return 0; return 0;