We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11c5c93 commit 974b7e8Copy full SHA for 974b7e8
src/User.php
@@ -1069,7 +1069,9 @@ public function prepareInputForUpdate($input)
1069
$extension = strtolower(pathinfo($fullpath, PATHINFO_EXTENSION));
1070
$extension = in_array($extension, ['png', 'gif']) ? 'png' : 'jpg';
1071
1072
- @mkdir(GLPI_PICTURE_DIR . "/$sub");
+ if (!file_exists(GLPI_PICTURE_DIR . "/$sub")) {
1073
+ mkdir(GLPI_PICTURE_DIR . "/$sub");
1074
+ }
1075
$picture_path = GLPI_PICTURE_DIR . "/{$sub}/{$filename}.{$extension}";
1076
self::dropPictureFiles("{$sub}/{$filename}.{$extension}");
1077
0 commit comments