Skip to content

Commit 585cf90

Browse files
committed
fix: improve URL validation for attachment retrieval
1 parent 4934616 commit 585cf90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/OpenWOO/Models/BijlageEntity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function getAttachmentURL(): string
4242
// First try by using the 'woo_Bijlage_id' field.
4343
$url = \wp_get_attachment_url($this->getAttachmentObjectID()) ?: '';
4444

45-
if ($url !== false) {
45+
if (is_string($url) && 0 < strlen($url)) {
4646
return $url;
4747
}
4848

0 commit comments

Comments
 (0)