Skip to content

Commit

Permalink
Correct the logic of returning cached values from get_url_content().
Browse files Browse the repository at this point in the history
  • Loading branch information
boonebgorges committed Sep 14, 2023
1 parent 9c19a1e commit 673bf9d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Controllers/HTTPTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ public function get_url_content( $url, $deprecated = '' ) {

$cached = wp_cache_get( $url, 'pressforward_external_pages' );
if ( false !== $cached ) {
return $cached;
return [
'body' => $cached,
'response_code' => 200,
];
}

// @todo Allow some overrides, via an `$args` param and/or a filter.
Expand Down

0 comments on commit 673bf9d

Please sign in to comment.