show reason for mime type detection failure in setup check
[phorkie.git] / src / phorkie / SetupCheck.php
index c4d365c7a79552166aea7e88413f44ef0087f821..e06f28cc62342bbdce019bb5e47c784c622a9f48 100644 (file)
@@ -133,8 +133,13 @@ class SetupCheck
     public function checkMimeTypeDetection()
     {
         $rp = new Repository_Post();
-        if ($rp->getType('<?php echo "foo"; ?>') != 'php') {
-            $this->fail('MIME type detection fails');
+        $type = $rp->getType('<?php echo "foo"; ?>', true);
+        if ($type != 'php') {
+            $msg = 'MIME type detection fails';
+            if ($type instanceof \PEAR_Error) {
+                $msg .= '. Error: ' . $type->getMessage();
+            }
+            $this->fail($msg);
         }
     }