do not try to delete if file does not exist
[phorkie.git] / src / phorkie / SetupCheck.php
index 95fd75993d2c3b88076573e75059915da39cd2c3..b205b87baa60a43631e0bd5281d85ccd873245fe 100644 (file)
@@ -74,14 +74,17 @@ class SetupCheck
 
     public function checkDatabase()
     {
-        if ($this->elasticsearch != '') {
+        if ($this->elasticsearch == '') {
             return;
         }
 
         $es = parse_url($this->elasticsearch);
         if (!preg_match("#/.+/#", $es['path'], $matches)) {
-            $this->fail('Improper elasticsearch url.  Elasticsearch requires a'
-                       . ' search domain to store your data. (e.g. http://localhost:9200/phorkie/)');
+            $this->fail(
+                'Improper elasticsearch url.  Elasticsearch requires a'
+                . ' search domain to store your data.'
+                . ' (e.g. http://localhost:9200/phorkie/)'
+            );
         }
         $dbs = new Database();
         $dbs->getSetup()->setup();