Skip to content

Commit 7d9b7fa

Browse files
author
Marco Pereirinha
committed
Bail early, if the asset is not ready
1 parent 21f4b36 commit 7d9b7fa

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

php/class-delivery.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,13 @@ public function convert_tags( $content, $context = 'view' ) {
10511051
$aliases[ $local_url ] = $cached[ $local_url ];
10521052
continue;
10531053
}
1054-
$cloudinary_url = $this->media->cloudinary_url( $relation['post_id'], explode( 'x', $size ), $relation['transformations'], $public_id );
1054+
1055+
$cloudinary_url = $this->media->cloudinary_url( $relation['post_id'], explode( 'x', $size ), $relation['transformations'], $public_id );
1056+
// The asset is not ready. Carry on.
1057+
if ( empty( $cloudinary_url ) ) {
1058+
continue;
1059+
}
1060+
10551061
$aliases[ $local_url . '?' ] = $cloudinary_url . '&';
10561062
$aliases[ $local_url ] = $cloudinary_url;
10571063

0 commit comments

Comments
 (0)