Skip to content

Commit 249d2c8

Browse files
authored
Merge pull request #311 from indieweb/fix/rel-me-fatal-wp7
Fix fatal error in REST API on WP 7.0
2 parents 69ed760 + 22fd026 commit 249d2c8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

includes/hcard/class-user.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ public static function rest_fields() {
263263
'me',
264264
array(
265265
'get_callback' => function ( $user ) {
266-
return array_values( self::get_rel_me( $user['id'] ) );
266+
$rel_me = self::get_rel_me( $user['id'] );
267+
return $rel_me ? array_values( $rel_me ) : array();
267268
},
268269
)
269270
);

0 commit comments

Comments
 (0)