diff --git a/validate.php b/validate.php index 16f6c054ce..91094d7f27 100755 --- a/validate.php +++ b/validate.php @@ -13,7 +13,6 @@ * the source code distribution for details. */ -use Illuminate\Support\Str; use LibreNMS\Config; use LibreNMS\ValidationResult; use LibreNMS\Validator; @@ -82,18 +81,18 @@ if (!file_exists('config.php')) { $pre_checks_failed = false; $syntax_check = `php -ln config.php`; -if (!Str::contains($syntax_check, 'No syntax errors detected')) { +if (strpos($syntax_check, 'No syntax errors detected') === false) { print_fail('Syntax error in config.php'); echo $syntax_check; $pre_checks_failed = true; } $first_line = rtrim(`head -n1 config.php`); -if (!Str::startsWith($first_line, '')) { +if (strpos(`tail config.php`, '?>') !== false) { print_fail("Remove the ?> at the end of config.php"); $pre_checks_failed = true; }