check for empty fork url
[phorkie.git] / src / phorkie / ForkRemote.php
index 76eec0589c3560193ec97f9aa3408a1fc0c4af4d..78c3caa37fd81740a293509b658fa91802314f5c 100644 (file)
@@ -22,6 +22,11 @@ class ForkRemote
 
     public function parse()
     {
 
     public function parse()
     {
+        if ($this->url == '') {
+            $this->error = 'Empty fork URL';
+            return false;
+        }
+
         $arUrl  = parse_url($this->url);
         $scheme = isset($arUrl['scheme']) ? $arUrl['scheme'] : '';
 
         $arUrl  = parse_url($this->url);
         $scheme = isset($arUrl['scheme']) ? $arUrl['scheme'] : '';