diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 9753f4b3d83..f62d1d71585 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1584,12 +1584,17 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
dol_syslog("Warning: module ".$modcss." declared a css path file into its descriptor that is empty.", LOG_WARNING);
}
// cssfile is a relative path
- print ''."\n".''."\n";
+ } else {
+ dol_syslog("Warning: module ".$modcss." declared a css path file for a file we can't find.", LOG_WARNING);
}
- print '">'."\n";
}
}
}
@@ -1728,7 +1733,12 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
$filesjs = (array) $filesjs; // To be sure filejs is an array
foreach ($filesjs as $jsfile) {
// jsfile is a relative path
- print ''."\n".''."\n";
+ $urlforjs = dol_buildpath($jsfile, 1);
+ if ($urlforjs) {
+ print ''."\n".''."\n";
+ } else {
+ dol_syslog("Warning: module ".$modjs." declared a js path file for a file we can't find.", LOG_WARNING);
+ }
}
}
}