commit 30709e6dffb69129f559796b67d8a4f8ad81f3b3
parent eae75c93c5106bec070164fa8e7f7a431c91920c
Author: Jan Dankert <develop@jandankert.de>
Date: Sat, 26 Oct 2019 22:00:20 +0200
Fix: Use correct Exception type for compability with PHP 5.x
Diffstat:
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/modules/cms-core/Dispatcher.class.php b/modules/cms-core/Dispatcher.class.php
@@ -11,19 +11,12 @@ use cms\action\RequestParams;
use ConfigurationLoader;
use database\Database;
use DbUpdate;
-use DomainException;
use Http;
-use http\Exception;
-use language\Language;
use Logger;
use LogicException;
-use ObjectNotFoundException;
use OpenRatException;
use SecurityException;
use Session;
-use Spyc;
-use template_engine\components\ElseComponent;
-use Text;
/**
@@ -364,7 +357,7 @@ class Dispatcher
$databases = Conf()->get('database');
if ( !is_array($databases))
- throw new Exception\RuntimeException('Corrupt configuration: Database configuration must be a list');
+ throw new \RuntimeException('Corrupt configuration: Database configuration must be a list');
foreach( $databases as $key => $dbconf )
{
@@ -386,7 +379,7 @@ class Dispatcher
$dbid = $dbids[0];
else
// Keine Datenbankverbindung vorhanden. Fallback:
- throw new Exception\RuntimeException('No database configured');
+ throw new \RuntimeException('No database configured');
}
@@ -398,7 +391,7 @@ class Dispatcher
$dbConfig = $dbConfig->subset($dbid );
if ( ! $dbConfig->is('enabled' ) )
- throw new Exception\RuntimeException('Database connection \''.$dbid.'\' is not enabled');
+ throw new \RuntimeException('Database connection \''.$dbid.'\' is not enabled');
try
{