comparison vendor/nikic/php-parser/test/bootstrap.php @ 13:5fb285c0d0e3

Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've been lucky to get away with this so far, as we don't support self-registration which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5 was vulnerable to.
author Chris Cannam
date Mon, 23 Apr 2018 09:33:26 +0100
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
12:7a779792577d 13:5fb285c0d0e3
16 $lines = array_map(function($line) { 16 $lines = array_map(function($line) {
17 return rtrim($line, " \t"); 17 return rtrim($line, " \t");
18 }, $lines); 18 }, $lines);
19 return implode("\n", $lines); 19 return implode("\n", $lines);
20 } 20 }
21
22 function filesInDir($directory, $fileExtension) {
23 $directory = realpath($directory);
24 $it = new \RecursiveDirectoryIterator($directory);
25 $it = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::LEAVES_ONLY);
26 $it = new \RegexIterator($it, '(\.' . preg_quote($fileExtension) . '$)');
27 foreach ($it as $file) {
28 $fileName = $file->getPathname();
29 yield $fileName => file_get_contents($fileName);
30 }
31 }