Skip to content

Commit

Permalink
[php:plugins] fix notice error
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Jul 28, 2016
1 parent 37fac71 commit f3c1ef2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion php/plugins/AutoResize/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function onUpLoadPreSave(&$path, &$name, $src, $elfinder, $volume) {
IMAGETYPE_BMP => IMG_WBMP,
IMAGETYPE_WBMP => IMG_WBMP
);
if (! ($opts['targetType'] & $imgTypes[$srcImgInfo[2]])) {
if (! isset($imgTypes[$srcImgInfo[2]]) || ! ($opts['targetType'] & $imgTypes[$srcImgInfo[2]])) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion php/plugins/Watermark/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function onUpLoadPreSave(&$path, &$name, $src, $elfinder, $volume) {
IMAGETYPE_BMP => IMG_WBMP,
IMAGETYPE_WBMP => IMG_WBMP
);
if (! ($opts['targetType'] & $imgTypes[$srcImgInfo[2]])) {
if (! isset($imgTypes[$srcImgInfo[2]]) || ! ($opts['targetType'] & $imgTypes[$srcImgInfo[2]])) {
return false;
}

Expand Down

0 comments on commit f3c1ef2

Please sign in to comment.