Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmigf committed Jun 25, 2024
1 parent 555827b commit c96cda5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/wcpdf-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -745,8 +745,8 @@ function wpo_wcpdf_get_image_mime_type( string $src ): string {
}
}

// Fallback to 'finfo_file' if mime type is empty for local files
if ( empty( $mime_type ) && function_exists( 'finfo_open' ) ) {
// Fallback to 'finfo_file' if mime type is empty for local files only (no remote files allowed)
if ( empty( $mime_type ) && function_exists( 'finfo_open' ) && ! filter_var( $src, FILTER_VALIDATE_URL ) ) {
$finfo = finfo_open( FILEINFO_MIME_TYPE );

if ( $finfo ) {
Expand Down

0 comments on commit c96cda5

Please sign in to comment.