Skip to content

Commit e6ee464

Browse files
authored
Update examples.rst
using return strtolower($data['name']); gives: Cannot use object of type Laminas\Diactoros\UploadedFile as array
1 parent 778c2b6 commit e6ee464

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/examples.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ This example uses the Imagine library. It can be installed through composer:
213213
'type' => 'photo_type',
214214
],
215215
'nameCallback' => function ($table, $entity, $data, $field, $settings) {
216-
return strtolower($data['name']);
216+
return strtolower($data->getClientFilename());
217217
},
218218
'transformer' => function ($table, $entity, $data, $field, $settings, $filename) {
219219
$extension = pathinfo($filename, PATHINFO_EXTENSION);

0 commit comments

Comments
 (0)