From 8e889dc65d7df36f3fca88cd7046604e9432323c Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Thu, 18 Aug 2016 18:00:22 +0300 Subject: [PATCH] 20.07.16 --- frontend/components/BgWidget.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/components/BgWidget.php b/frontend/components/BgWidget.php index bf78691..26a5ce5 100755 --- a/frontend/components/BgWidget.php +++ b/frontend/components/BgWidget.php @@ -22,9 +22,12 @@ class BgWidget extends Widget{ $this->bg = Bg::find()->orderBy('random()')->one(); } - public function run(){ - return ' + public function run(){ + if(isset($this->bg) && !empty($this->bg)){ + return ' '; + } + } } ?> \ No newline at end of file -- libgit2 0.21.4