From f41f80601110a74c1618634c04a65b8d951b8402 Mon Sep 17 00:00:00 2001 From: Gustavo Bordoni Date: Wed, 12 Jun 2024 14:50:27 -0400 Subject: [PATCH] Add an array unique --- src/Assets/Asset.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Assets/Asset.php b/src/Assets/Asset.php index 8d3ad06..987b81a 100644 --- a/src/Assets/Asset.php +++ b/src/Assets/Asset.php @@ -939,6 +939,8 @@ public function maybe_get_min_file( $url ) { $urls[] = $relative_location; } + $urls = array_unique( $urls ); + // Check for all Urls added to the array. foreach ( $urls as $partial_path ) { $file_path = wp_normalize_path( "{$base_dir}/{$partial_path}" );