1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-14 04:30:29 +01:00

[ticket/15919] Don't run lint test against node_modules

Also, make sure to correctly handle opendir returning false instead of
the stream handle.

PHPBB3-15919
This commit is contained in:
Marc Alexander 2018-12-23 14:35:58 +01:00
parent 70a56c208f
commit 14f9917db6
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -67,6 +67,12 @@ class phpbb_lint_test extends phpbb_test_case
{
$files = array();
$dh = opendir($root);
if ($dh === false)
{
return $files;
}
while (($filename = readdir($dh)) !== false)
{
if ($filename == '.' || $filename == '..')
@ -89,6 +95,7 @@ class phpbb_lint_test extends phpbb_test_case
// PHP Fatal error: Cannot declare class Container because the name is already in use in /var/www/projects/phpbb3/tests/../phpBB/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php on line 20
// https://gist.github.com/e003913ffd493da63cbc
dirname(__FILE__) . '/../phpBB/vendor',
dirname(__FILE__) . '/../node_modules',
)))
{
$files = array_merge($files, $this->check($path));