Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
locale_update_js_files() tries to open file with name ./.js. Found the name in the variable 'javascript_parsed' but the error continue even after I deleted this variable. The following patch will shut up the error message (but not fix the original problem, if it is caused by another module).
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index dfffb2e..59ad891 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -513,7 +513,7 @@ function locale_update_js_files() {
$files = TRUE;
if (!in_array($filepath, $parsed)) {
// Don't parse our own translations files.
- if (substr($filepath, 0, strlen($dir)) != $dir) {
+ if (substr($filepath, 0, strlen($dir)) != $dir && strlen(basename($filepath)) > 0) {
locale_inc_callback('_locale_parse_js_file', $filepath);
$parsed[] = $filepath;
$new_files = TRUE;
Comments