Skip to content

Commit 665e37b

Browse files
fix: retrive image URL from query params
1 parent ecff7e5 commit 665e37b

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
@@ -1866,9 +1866,9 @@ public function feedzy_image_encode( $img_url ) {
18661866
// Check if img url is set as an URL parameter.
18671867
$url_tab = wp_parse_url( $img_url );
18681868
if ( isset( $url_tab['query'] ) ) {
1869-
preg_match_all( '/(http|https):\/\/[^ ]+(\.gif|\.GIF|\.jpg|\.JPG|\.jpeg|\.JPEG|\.png|\.PNG)/', $url_tab['query'], $img_url );
1870-
if ( isset( $img_url[0][0] ) ) {
1871-
$img_url = $img_url[0][0];
1869+
preg_match_all( '/(http|https):\/\/[^ ]+(\.gif|\.GIF|\.jpg|\.JPG|\.jpeg|\.JPEG|\.png|\.PNG)/', $url_tab['query'], $matches );
1870+
if ( isset( $matches[0][0] ) ) {
1871+
$img_url = $matches[0][0];
18721872
}
18731873
}
18741874

0 commit comments

Comments
 (0)