diff --git a/js/wizardhelper.js b/js/wizardhelper.js index e6e4b0c31..5877e7562 100644 --- a/js/wizardhelper.js +++ b/js/wizardhelper.js @@ -261,7 +261,7 @@ function WizardHelper(sClass, sFormPrefix, sState, sInitialState, sStimulus) { index++; } - if($('.blockUI').length > 0) { + if ((fieldForm !== null) && ($('.blockUI').length > 0)) { fieldForm.find('button[type=submit]:not(:disabled)').prop("disabled", true).addClass('disabledDuringFieldLoading'); } diff --git a/test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php b/test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php index 77427cd94..63ade2736 100644 --- a/test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php +++ b/test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php @@ -42,9 +42,12 @@ class iTopConfigSyntaxValidatorTest extends ItopTestCase $this->expectException(\Exception::class); try{ $oiTopConfigValidator->Validate(""); - }catch (\Exception $e) - { - $this->assertStringStartsWith('Error in configuration: syntax error, unexpected \'zdadz\' (T_STRING)', $e->getMessage()); + } catch (\Exception $e) { + if (version_compare(phpversion(), '8.0.0', '<')) { + $this->assertStringStartsWith('Error in configuration: syntax error, unexpected \'zdadz\' (T_STRING)', $e->getMessage()); + } else { + $this->assertStringStartsWith('Error in configuration: syntax error, unexpected identifier "zdadz" at line 2', $e->getMessage()); + } throw $e; } }