You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What basename($post_image) returns: IMG_0171-50x35.jpg?utm_source=sailthru&utm_medium=email. Which wouldn't be a problem if you didn't replace the $filename with $encfilename.
The outcome of the new attachment URL that is send to Sailthru is now: https://DOMAIN/wp-content/uploads/2024/04/IMG_1000-50x35.jpg%3Futm_source%3Dsailthru%26utm_medium%3Demail which isn't a valid URL since only the query params are encoded.
Added in #111
basename of the image URL that contains query params will include these queries.
Example:
Attachment:
$image[0] = https://DOMAIN/wp-content/uploads/2024/04/IMG_1000-50x35.jpg?utm_source=sailthru&utm_medium=email
What basename($post_image) returns:
IMG_0171-50x35.jpg?utm_source=sailthru&utm_medium=email
. Which wouldn't be a problem if you didn't replace the$filename
with$encfilename
.The outcome of the new attachment URL that is send to Sailthru is now:
https://DOMAIN/wp-content/uploads/2024/04/IMG_1000-50x35.jpg%3Futm_source%3Dsailthru%26utm_medium%3Demail
which isn't a valid URL since only the query params are encoded.Suggested replacement:
$filename = basename(parse_url($url, PHP_URL_PATH));
The text was updated successfully, but these errors were encountered: