diff --git a/core/config.class.inc.php b/core/config.class.inc.php index 063f681ed..cadf36fc5 100644 --- a/core/config.class.inc.php +++ b/core/config.class.inc.php @@ -1360,6 +1360,12 @@ class Config throw new ConfigException('Error in configuration file', array('file' => $sConfigFile, 'error' => $e->getMessage())); } + catch(Error $e) + { + // PHP 7 + throw new ConfigException('Error in configuration file', + array('file' => $sConfigFile, 'error' => $e->getMessage().' at line '.$e->getLine())); + } if (strlen($sNoise) > 0) { // Note: sNoise is an html output, but so far it was ok for me (e.g. showing the entire call stack) diff --git a/datamodels/2.x/itop-config/config.php b/datamodels/2.x/itop-config/config.php index 5c9993c62..0ea260951 100644 --- a/datamodels/2.x/itop-config/config.php +++ b/datamodels/2.x/itop-config/config.php @@ -46,7 +46,7 @@ function TestConfig($sContents, $oP) catch (Error $e) { // ParseError only thrown in PHP7 - throw new Exception('Error in configuration: '.$e->getMessage()); + throw new Exception('Error in configuration: '.$e->getMessage().' at line '.$e->getLine()); } if (strlen($sNoise) > 0) { diff --git a/setup/extensionsmap.class.inc.php b/setup/extensionsmap.class.inc.php index 0976862ad..12c44e241 100644 --- a/setup/extensionsmap.class.inc.php +++ b/setup/extensionsmap.class.inc.php @@ -448,6 +448,11 @@ class iTopExtensionsMap SetupPage::log_warning("Eval of $sModuleFile did not return the expected information..."); } } + catch(ParseError $e) + { + // Continue... + SetupPage::log_warning("Eval of $sModuleFile caused a parse error: ".$e->getMessage()." at line ".$e->getLine()); + } catch(Exception $e) { // Continue... @@ -1348,4 +1353,4 @@ class iTopExtensionsMap ), ); } -} \ No newline at end of file +} diff --git a/setup/modulediscovery.class.inc.php b/setup/modulediscovery.class.inc.php index 4a92f7ad5..e1a2e7ef7 100644 --- a/setup/modulediscovery.class.inc.php +++ b/setup/modulediscovery.class.inc.php @@ -465,6 +465,11 @@ class ModuleDiscovery //echo "

Done.

\n"; } + catch(ParseError $e) + { + // PHP 7 + SetupPage::log_warning("Eval of $sRelDir/$sFile caused an exception: ".$e->getMessage()." at line ".$e->getLine()); + } catch(Exception $e) { // Continue... diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index 80d6dfb46..34c2e2a43 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -56,7 +56,7 @@ class SetupUtils const PHP_NEXT_MIN_VERSION = ''; // no new PHP requirement for now in iTop 2.6 const MYSQL_NEXT_MIN_VERSION = ''; // no new MySQL requirement for now in iTop 2.6 // -- First recent version that is not yet validated by Combodo (warning) - const PHP_NOT_VALIDATED_VERSION = '7.2.0'; + const PHP_NOT_VALIDATED_VERSION = '7.3.0'; const MIN_MEMORY_LIMIT = 33554432; // 32 * 1024 * 1024 - we can use expressions in const since PHP 5.6 but we are in the setup ! const SUHOSIN_GET_MAX_VALUE_LENGTH = 2048;