Error when trying to delete offer without image #20

Closed
opened 2021-09-14 23:36:26 +02:00 by thisfro · 1 comment
Owner

App\Service\OfferPhotoHelper::deleteOfferPhoto(): Argument #2 ($filename) must be of type string, null given, called in home/thisfro/repos/plant-exchange/src/Controller/OfferController.php on line 135

	...
	public function deleteOfferPhoto(string $photoDir, string $filename)
	{
		$file = $photoDir . '/' . $filename;
		if($this->filesystem->exists($file)) {
			$this->filesystem->remove($file);
		}
	...

```App\Service\OfferPhotoHelper::deleteOfferPhoto(): Argument #2 ($filename) must be of type string, null given, called in home/thisfro/repos/plant-exchange/src/Controller/OfferController.php on line 135``` ```php ... public function deleteOfferPhoto(string $photoDir, string $filename) { $file = $photoDir . '/' . $filename; if($this->filesystem->exists($file)) { $this->filesystem->remove($file); } ... ```
Author
Owner

Fixed by 28f71ee479

Fixed by 28f71ee479
thisfro added the
Bug
label 2022-01-12 16:50:01 +01:00
This repo is archived. You cannot comment on issues.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: thisfro/pflaenz.li-Symfony#20
No description provided.