From 33302313adc8fd2932a9749d93649e7518e4d91e Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 10 Aug 2023 18:15:42 +0800 Subject: [PATCH] getcompileDir can fail - and return empty --- Asset.php | 1 + AssetTrait.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Asset.php b/Asset.php index 9b546c03..3e49f8eb 100644 --- a/Asset.php +++ b/Asset.php @@ -158,6 +158,7 @@ class Pman_Core_Asset extends Pman { return false; } + if (file_exists($compile_dir)) { return $compile_dir; } diff --git a/AssetTrait.php b/AssetTrait.php index 27b9c4b0..0067d6f2 100644 --- a/AssetTrait.php +++ b/AssetTrait.php @@ -78,8 +78,8 @@ trait Pman_Core_AssetTrait { $ff = HTML_FlexyFramework::get(); - if (!empty($ff->Pman['isDev']) && !empty($_REQUEST['isDev'])) { - echo "\n"; + if (empty($compiledir) || (!empty($ff->Pman['isDev']) && !empty($_REQUEST['isDev']))) { + echo "\n"; $this->assetArrayToHtml($files,'js'); return; } -- 2.39.2