Skip to content

Commit 76ae32b

Browse files
fix: retrive image URL from query params
1 parent c35b8bb commit 76ae32b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

includes/abstract/feedzy-rss-feeds-admin-abstract.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,9 +1840,9 @@ public function feedzy_image_encode( $img_url ) {
18401840
// Check if img url is set as an URL parameter.
18411841
$url_tab = wp_parse_url( $img_url );
18421842
if ( isset( $url_tab['query'] ) ) {
1843-
preg_match_all( '/(http|https):\/\/[^ ]+(\.gif|\.GIF|\.jpg|\.JPG|\.jpeg|\.JPEG|\.png|\.PNG)/', $url_tab['query'], $img_url );
1844-
if ( isset( $img_url[0][0] ) ) {
1845-
$img_url = $img_url[0][0];
1843+
preg_match_all( '/(http|https):\/\/[^ ]+(\.gif|\.GIF|\.jpg|\.JPG|\.jpeg|\.JPEG|\.png|\.PNG)/', $url_tab['query'], $matches );
1844+
if ( isset( $matches[0][0] ) ) {
1845+
$img_url = $matches[0][0];
18461846
}
18471847
}
18481848

0 commit comments

Comments
 (0)