-
-
Save Berdir/34299ecb260af6fec2e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -219,7 +219,9 @@ public function delete() { | |
$entity = $this->getRoot(); | |
// Delete all file usages within this entity. | |
- file_usage()->delete($this->entity, 'file', $entity->entityType(), $entity->id(), 0); | |
+ if ($this->entity) { | |
+ file_usage()->delete($this->entity, 'file', $entity->entityType(), $entity->id(), 0); | |
+ } | |
} | |
/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment