Commit 8cd3ba35 authored by Clouard Regis's avatar Clouard Regis
Browse files

Fix bug on remove course.

parent 95257f86
......@@ -128,7 +128,7 @@ class Course
public function remove(ObjectManager $entityManager)
{
unlink($this->image);
if (file_exists($this->image)) unlink($this->image);
$entityManager->remove($this);
$entityManager->flush();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment