[web-php] redesign-downloads-page-prototype: Silence warning if there are no JS files
| From: | Derick Rethans | Date: | Mon, 21 Jul 2025 15:33:08 +0000 |
| Subject: | [web-php] redesign-downloads-page-prototype: Silence warning if there are no JS files | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-33022@lists.php.net to get a copy of this message | ||
Author: Derick Rethans (derickr)
Date: 2025-07-21T15:12:58+01:00
Commit: https://github.com/php/web-php/commit/974d1557e7279f634de96b3b1210038136e9fe61
Raw diff: https://github.com/php/web-php/commit/974d1557e7279f634de96b3b1210038136e9fe61.diff
Silence warning if there are no JS files
Changed paths:
M include/header.inc
Diff:
diff --git a/include/header.inc b/include/header.inc
index 4ba558fb17..f6667a4e30 100644
--- a/include/header.inc
+++ b/include/header.inc
@@ -23,6 +23,7 @@ foreach($css_files as $filename) {
$CSS[$filename] = @filemtime($path);
}
+$JS = [];
if (isset($config["js_files"])) {
foreach($config['js_files'] as $filename) {
$path = dirname(__DIR__) . $filename;