Merge pull request #220 from pfefferle/pass-wp-error-through

This commit is contained in:
Matthias Pfefferle 2022-12-15 14:33:36 +01:00 committed by GitHub
commit d20383b4a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -118,6 +118,10 @@ function get_remote_metadata_by_actor( $actor ) {
return null;
}
if ( is_wp_error( $actor ) ) {
return $actor;
}
$metadata = \get_transient( 'activitypub_' . $actor );
if ( $metadata ) {

View file

@ -68,7 +68,7 @@ class Friends_Feed_Parser_ActivityPub extends \Friends\Feed_Parser {
*/
public function update_feed_details( $feed_details ) {
$meta = \Activitypub\get_remote_metadata_by_actor( $feed_details['url'] );
if ( ! $meta && is_wp_error( $meta ) ) {
if ( ! $meta || is_wp_error( $meta ) ) {
return $meta;
}