Skip to content

Commit

Permalink
undefined index fix
Browse files Browse the repository at this point in the history
remove comments
  • Loading branch information
noumo committed Feb 4, 2016
1 parent 16d657d commit a75aeb6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions components/ApiObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion components/CategoryModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function behaviors()
]
];

if($moduleSettings['categoryThumb']){
if(isset($moduleSettings['categoryThumb']) && $moduleSettings['categoryThumb']){
$behaviors['imageFileBehavior'] = ImageFile::className();
}

Expand Down
2 changes: 1 addition & 1 deletion components/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit a75aeb6

Please sign in to comment.