Skip to content

Commit 1c10b1c

Browse files
committed
Merge branch '10.0/bugfixes' into 11.0/bugfixes
2 parents d369c00 + 755d154 commit 1c10b1c

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/CommonItilObject_Item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ public static function showListForItem(CommonDBTM $item, $withtemplate = 0, $opt
694694
if (method_exists(static::$itemtype_1, 'getCriteriaFromProfile')) {
695695
$profile_criteria = static::$itemtype_1::getCriteriaFromProfile();
696696
$criteria['WHERE'] = array_merge($criteria['WHERE'], $profile_criteria['WHERE'] ?? []);
697-
$criteria['LEFT JOIN'] = array_merge($criteria['LEFT JOIN'], $profile_criteria['LEFT JOIN'] ?? []); // @phpstan-ignore offsetAccess.notFound
697+
$criteria['LEFT JOIN'] = array_merge($criteria['LEFT JOIN'], $profile_criteria['LEFT JOIN'] ?? []);
698698
}
699699
$criteria['WHERE'][static::$itemtype_1::getTable() . ".is_deleted"] = 0;
700700
$criteria['LIMIT'] = (int) $_SESSION['glpilist_limit'];

src/UploadHandler.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
use function Safe\imagealphablending;
5757
use function Safe\imagecopyresampled;
5858
use function Safe\imagecreatetruecolor;
59-
use function Safe\imagedestroy;
6059
use function Safe\imageflip;
6160
use function Safe\imagerotate;
6261
use function Safe\imagesavealpha;
@@ -757,12 +756,7 @@ protected function gd_destroy_image_object($file_path)
757756
{
758757
$image = $this->image_objects[$file_path] ?? null ;
759758
if ($image) {
760-
try {
761-
imagedestroy($image);
762-
return true;
763-
} catch (ImageException $e) {
764-
return false;
765-
}
759+
return true;
766760
}
767761
return false;
768762
}
@@ -850,7 +844,6 @@ protected function gd_orient_image($file_path, $src_img)
850844
defined('IMG_FLIP_HORIZONTAL') ? IMG_FLIP_HORIZONTAL : 1
851845
);
852846
$new_img = imagerotate($tmp_img, 270, 0);
853-
imagedestroy($tmp_img);
854847
break;
855848
case 6:
856849
$new_img = imagerotate($src_img, 270, 0);
@@ -861,7 +854,6 @@ protected function gd_orient_image($file_path, $src_img)
861854
defined('IMG_FLIP_VERTICAL') ? IMG_FLIP_VERTICAL : 2
862855
);
863856
$new_img = imagerotate($tmp_img, 270, 0);
864-
imagedestroy($tmp_img);
865857
break;
866858
case 8:
867859
$new_img = imagerotate($src_img, 90, 0);

0 commit comments

Comments
 (0)