Skip to content

Commit 28b7a93

Browse files
committed
as static function and cast as an array
1 parent 646e5b9 commit 28b7a93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

includes/field/object.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ public static function render( $field ) {
5050
break;
5151
}
5252

53-
$items = array_map( function( $post ) {
53+
$items = array_map( static function( $post ) {
5454
return (array) $post;
55-
}, $items );
55+
}, (array) $items );
5656

5757
$field['type'] = 'select2';
5858
$field['options'] = array_column( $items, $val_prop, $lbl_prop );

0 commit comments

Comments
 (0)