From a75aeb698cf3a0ceb7655628154fc6b5e8f4168c Mon Sep 17 00:00:00 2001 From: noumo Date: Thu, 4 Feb 2016 20:42:42 +0300 Subject: [PATCH] undefined index fix remove comments --- components/ApiObject.php | 3 --- components/CategoryModel.php | 2 +- components/Module.php | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/components/ApiObject.php b/components/ApiObject.php index 639ff6a..d44c256 100644 --- a/components/ApiObject.php +++ b/components/ApiObject.php @@ -62,9 +62,6 @@ public function thumb($width = null, $height = null) /** * Returns web path to image. - * @param int|null $width - * @param int|null $height - * @param bool $crop if false image will be resize instead of cropping * @return string */ public function getImage() diff --git a/components/CategoryModel.php b/components/CategoryModel.php index c28f776..43c4442 100644 --- a/components/CategoryModel.php +++ b/components/CategoryModel.php @@ -73,7 +73,7 @@ public function behaviors() ] ]; - if($moduleSettings['categoryThumb']){ + if(isset($moduleSettings['categoryThumb']) && $moduleSettings['categoryThumb']){ $behaviors['imageFileBehavior'] = ImageFile::className(); } diff --git a/components/Module.php b/components/Module.php index 0903257..58aba6b 100644 --- a/components/Module.php +++ b/components/Module.php @@ -95,6 +95,6 @@ public static function getModuleName($namespace) public static function setting($name) { $settings = Yii::$app->getModule('admin')->activeModules[static::getSelfName()]->settings; - return $settings[$name] !== null ? $settings[$name] : null; + return isset($settings[$name]) ? $settings[$name] : null; } } \ No newline at end of file