Merge pull request #220 from pfefferle/pass-wp-error-through
This commit is contained in:
commit
d20383b4a9
2 changed files with 5 additions and 1 deletions
|
@ -118,6 +118,10 @@ function get_remote_metadata_by_actor( $actor ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( is_wp_error( $actor ) ) {
|
||||||
|
return $actor;
|
||||||
|
}
|
||||||
|
|
||||||
$metadata = \get_transient( 'activitypub_' . $actor );
|
$metadata = \get_transient( 'activitypub_' . $actor );
|
||||||
|
|
||||||
if ( $metadata ) {
|
if ( $metadata ) {
|
||||||
|
|
|
@ -68,7 +68,7 @@ class Friends_Feed_Parser_ActivityPub extends \Friends\Feed_Parser {
|
||||||
*/
|
*/
|
||||||
public function update_feed_details( $feed_details ) {
|
public function update_feed_details( $feed_details ) {
|
||||||
$meta = \Activitypub\get_remote_metadata_by_actor( $feed_details['url'] );
|
$meta = \Activitypub\get_remote_metadata_by_actor( $feed_details['url'] );
|
||||||
if ( ! $meta && is_wp_error( $meta ) ) {
|
if ( ! $meta || is_wp_error( $meta ) ) {
|
||||||
return $meta;
|
return $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue