Skip to content

Commit

Permalink
fix directory permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k1o committed Jun 25, 2020
1 parent 80a376d commit 6f03baa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/image.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ public static function upload(){
// Ensure, that directories exists
$_images_path = Config::get('images_path');
$_thumbnails_path = Config::get('thumbnails_path');
if((!is_dir($_images_path) && !mkdir($_images_path, 755, true)) || (!is_dir($_thumbnails_path) && !mkdir($_thumbnails_path, 755, true))){
if(
(!is_dir($_images_path) && !mkdir($_images_path, 0755, true)) ||
(!is_dir($_thumbnails_path) && !mkdir($_thumbnails_path, 0755, true))
){
throw new Exception("Images or thumbnails directory could not be created.");
}

Expand Down

0 comments on commit 6f03baa

Please sign in to comment.