Skip to content

Commit af11d49

Browse files
committed
Only try to find the entry if its a string (an id) ...
It's possible the value is already an Entry, or a Page, or null. #1465 - Doesn't fix it, but this error was making this issue happen quite frequently.
1 parent bdf9f7a commit af11d49

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Fieldtypes/Entries.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,11 @@ protected function toItemArray($id)
172172

173173
protected function augmentValue($value)
174174
{
175-
if ($entry = Entry::find($value)) {
176-
return $entry;
175+
if (is_string($value)) {
176+
$value = Entry::find($value);
177177
}
178+
179+
return $value;
178180
}
179181

180182
protected function shallowAugmentValue($value)

0 commit comments

Comments
 (0)