Fix Version20210923090920.php

pull/3996/head
Julio 3 years ago
parent e78777ead2
commit cff4a2ba56
  1. 5
      src/CoreBundle/Migrations/Schema/V200/Version20210923090920.php

@ -37,14 +37,15 @@ final class Version20210923090920 extends AbstractMigrationChamilo
if (empty($directory)) {
continue;
}
$picturePath = $rootPath.'/app/courses/'.$directory.'/course-pic.png';
$admin = $this->getAdmin();
if ($illustrationRepo->hasIllustration($course)) {
continue;
}
$picturePath = $rootPath.'/app/courses/'.$directory.'/course-pic.png';
if ($this->fileExists($picturePath)) {
$admin = $this->getAdmin();
$mimeType = mime_content_type($picturePath);
$uploadFile = new UploadedFile($picturePath, 'course-pic', $mimeType, null, true);
$illustrationRepo->addIllustration(

Loading…
Cancel
Save