Skip to content

Commit

Permalink
LSO: include check if lso abstract or extro image exists. If not do n…
Browse files Browse the repository at this point in the history
…ot execute deletion of file(s). (#37590) (ILIAS-eLearning#6234)
  • Loading branch information
lukastocker authored and nhaagen committed Aug 18, 2023
1 parent 0244d3b commit 22aa84e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
Expand All @@ -18,6 +16,8 @@
*
*********************************************************************/

declare(strict_types=1);

/**
* Storage of images in settings.
*/
Expand Down Expand Up @@ -69,7 +69,9 @@ public function delete_image(string $which, ilLearningSequenceSettings $settings
$delete = $settings->getExtroImage();
$settings = $settings->withExtroImage();
}
$this->deleteFile($delete);
if (!empty($delete)) {
$this->deleteFile($delete);
}
return $settings;
}

Expand Down

0 comments on commit 22aa84e

Please sign in to comment.