Skip to content

Commit d20383b

Browse files
authored
Merge pull request #220 from pfefferle/pass-wp-error-through
2 parents bf335b2 + 034ba05 commit d20383b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

includes/functions.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ function get_remote_metadata_by_actor( $actor ) {
118118
return null;
119119
}
120120

121+
if ( is_wp_error( $actor ) ) {
122+
return $actor;
123+
}
124+
121125
$metadata = \get_transient( 'activitypub_' . $actor );
122126

123127
if ( $metadata ) {

integration/class-friends-feed-parser-activitypub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function feed_support_confidence( $url, $mime_type, $title, $content = nu
6868
*/
6969
public function update_feed_details( $feed_details ) {
7070
$meta = \Activitypub\get_remote_metadata_by_actor( $feed_details['url'] );
71-
if ( ! $meta && is_wp_error( $meta ) ) {
71+
if ( ! $meta || is_wp_error( $meta ) ) {
7272
return $meta;
7373
}
7474

0 commit comments

Comments
 (0)