From 62e138eee058768f5a12806c2b0b7b919422d124 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 30 Oct 2025 23:15:36 +0000 Subject: [PATCH] Fix public asset cache-busting to execute filemtime() not output PHP code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/RSpade/Core/Bundle/Rsx_Bundle_Abstract.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/RSpade/Core/Bundle/Rsx_Bundle_Abstract.php b/app/RSpade/Core/Bundle/Rsx_Bundle_Abstract.php index 86e979446..e559b56a3 100755 --- a/app/RSpade/Core/Bundle/Rsx_Bundle_Abstract.php +++ b/app/RSpade/Core/Bundle/Rsx_Bundle_Abstract.php @@ -398,7 +398,8 @@ abstract class Rsx_Bundle_Abstract // Add public directory CSS (with filemtime cache-busting) $public_css = $compiled['public_css'] ?? []; foreach ($public_css as $asset) { - $html[] = ''; + $mtime = file_exists($asset['full_path']) ? filemtime($asset['full_path']) : time(); + $html[] = ''; } // Add JS: jQuery first, then others @@ -415,7 +416,8 @@ abstract class Rsx_Bundle_Abstract // Add public directory JS (with filemtime cache-busting and defer) $public_js = $compiled['public_js'] ?? []; foreach ($public_js as $asset) { - $html[] = ''; + $mtime = file_exists($asset['full_path']) ? filemtime($asset['full_path']) : time(); + $html[] = ''; } // Add CSS bundles