X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/583c94a962d155468bb848d00aab5fe5d6eb95c8..2a665e0f4eeb45c9d57df7dc7f9d853465b5fea9:/src/phorkie/SetupCheck.php diff --git a/src/phorkie/SetupCheck.php b/src/phorkie/SetupCheck.php index c4d365c..32fb79e 100644 --- a/src/phorkie/SetupCheck.php +++ b/src/phorkie/SetupCheck.php @@ -46,6 +46,13 @@ class SetupCheck public function checkConfigFiles() { + if (!isset($GLOBALS['phorkie']['cfgfiles']) + || count($GLOBALS['phorkie']['cfgfiles']) == 0 + ) { + $this->info('No config files registered'); + return; + } + foreach ($GLOBALS['phorkie']['cfgfiles'] as $file => $loaded) { if ($loaded) { $this->ok('Loaded config file: ' . Tools::foldPath($file)); @@ -133,8 +140,13 @@ class SetupCheck public function checkMimeTypeDetection() { $rp = new Repository_Post(); - if ($rp->getType('') != 'php') { - $this->fail('MIME type detection fails'); + $type = $rp->getType('', true); + if ($type != 'php') { + $msg = 'MIME type detection fails'; + if ($type instanceof \PEAR_Error) { + $msg .= '. Error: ' . $type->getMessage(); + } + $this->fail($msg); } }