From aa35f57260e4bb082c8be33f8604cfac75a2ac92 Mon Sep 17 00:00:00 2001 From: hbraune Date: Sat, 17 Jan 2015 17:59:11 +0100 Subject: [PATCH] Added null as default argument for image setter In case there is a validation error on another property of the model, the file reference is not created and TYPO3 throws an execption due to the expectation of a FileReference-Object. --- Classes/Domain/Model/Example.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Domain/Model/Example.php b/Classes/Domain/Model/Example.php index 8ecfb55..c1815bc 100644 --- a/Classes/Domain/Model/Example.php +++ b/Classes/Domain/Model/Example.php @@ -94,7 +94,7 @@ public function getImage() { * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image * @return void */ - public function setImage($image) { + public function setImage($image = null) { $this->image = $image; }