Skip to content

Commit 00517c0

Browse files
committed
improve error messages
1 parent 09b524d commit 00517c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/Library/CrudPanel/Traits/FieldsProtectedMethods.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,12 @@ protected function makeSureSubfieldsHaveNecessaryAttributes($field)
259259
}
260260

261261
if(! is_multidimensional_array($field['subfields'], true)) {
262-
abort(500, 'Subfields of «'.$field['name'].'» are malformed. Make sure you provide an array of subfields');
262+
abort(500, 'Subfields of «'.$field['name'].'» are malformed. Make sure you provide an array of subfields.');
263263
}
264264

265265
foreach ($field['subfields'] as $key => $subfield) {
266266
if (empty($subfield) || ! isset($subfield['name'])) {
267-
abort(500, 'Subfield name can\'t be empty');
267+
abort(500, 'A subfield of «'.$field['name'].'» is malformed. Subfield attribute name can\'t be empty.');
268268
}
269269

270270
// make sure the field definition is an array

0 commit comments

Comments
 (0)