From ab8c791df8fc079b0aaf0bfcd9ddc3c96ed09342 Mon Sep 17 00:00:00 2001 From: Thiery Laverdure Date: Thu, 26 Jan 2017 12:50:12 -0500 Subject: [PATCH] Fixes null Post when using image in repeater For some reason `$this->post->find(intval($attachmentId));` was returning `null` even though the image did exists. --- src/Field/Image.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Field/Image.php b/src/Field/Image.php index 11fdfa4..f281e3a 100644 --- a/src/Field/Image.php +++ b/src/Field/Image.php @@ -60,7 +60,8 @@ public function process($field) { $attachmentId = $this->fetchValue($field); - $attachment = $this->post->find(intval($attachmentId)); + $attachment = $this->post->attachment()->find(intval($attachmentId)); + $this->fillFields($attachment); $imageData = $this->fetchMetadataValue($attachment);