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

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()
{
while ($row = $this->DB->fetch_object()) {
if ($row->type == self::EFFECT_HIDEUSERINFO) {
return $row->time;
if ($this->DB) {
while ($row = $this->DB->fetch_object()) {
if ($row->type == self::EFFECT_HIDEUSERINFO) {
return $row->time;
}
}
}
return 0;