Skip to content
Snippets Groups Projects

Issue #3238915: Refactor (if feasible) uses of the jQuery ready function to use VanillaJS

Closed Issue #3238915: Refactor (if feasible) uses of the jQuery ready function to use VanillaJS
Closed Harumi Jang requested to merge issue/drupal-3238915:3238915-refactor-if-feasible into 9.3.x
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
  • fc77080d
    Issue #3221507 by mxr576: mkdir can fail in... · fc77080d
    Alex Pott authored
    Issue #3221507 by mxr576: mkdir can fail in Drupal\TestTools\PhpUnitCompatibility\PhpUnit8::flushAlteredCodeToFile() because of a race condition
@@ -104,8 +104,8 @@ private static function flushAlteredCodeToFile(string $file_name, string $altere
@@ -104,8 +104,8 @@ private static function flushAlteredCodeToFile(string $file_name, string $altere
// Only write when necessary.
// Only write when necessary.
if (!file_exists($full_path) || md5_file($full_path) !== md5($altered_code)) {
if (!file_exists($full_path) || md5_file($full_path) !== md5($altered_code)) {
// Create directory when necessary.
// Create directory when necessary.
if (!file_exists($directory)) {
if (!is_dir($directory) && !@mkdir($directory, 0777, TRUE) && !is_dir($directory)) {
mkdir($directory, 0777, TRUE);
throw new \RuntimeException('Unable to create directory: ' . $directory);
}
}
file_put_contents($full_path, $altered_code);
file_put_contents($full_path, $altered_code);
}
}
Loading