Skip to content

Commit fcb9c46

Browse files
FIX Don't return invalid value (#453)
If there's no record that should be a 404. Returning empty string is invalid for this method so would have been a 500!
1 parent 3094411 commit fcb9c46

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/GridFieldNestedForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ public function handleNestedItem(
367367
$record = $list->byID($recordID);
368368
}
369369
if (!$record) {
370-
return '';
370+
throw new HTTPResponse_Exception(statusCode: 404);
371371
}
372372
$relationName = $this->getRelationName();
373373
if (!$record->hasMethod($relationName)) {

0 commit comments

Comments
 (0)