diff --git a/_incl_data/class/User.php b/_incl_data/class/User.php index 503fbbf0..8ca8cc3e 100644 --- a/_incl_data/class/User.php +++ b/_incl_data/class/User.php @@ -1880,7 +1880,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` private function __construct() { if (!empty($_SESSION['uid'])) { - $this->info = Db::getRow( + $user = Db::getRow( 'select *, users.id as id, @@ -1898,7 +1898,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` [$_SESSION['uid']] ); } else { - $this->info = Db::getRow( + $user = Db::getRow( 'select *, users.id as id, @@ -1917,9 +1917,10 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.` ); } - if (empty($this->info)) { - $this->info = []; + if (!empty($user) && is_array($user)) { + $this->info = $user; } + unset($user); Database::init(); // для всяких mysql_* diff --git a/buttons.php b/buttons.php index baf5ece5..60185b89 100644 --- a/buttons.php +++ b/buttons.php @@ -1,13 +1,22 @@
Произошла ошибка: (c) ' . $c[1] . '' . $e . '