]> git.mxchange.org Git - friendica-addons.git/commitdiff
Diaspora - set host to empty if it doesn't exist.
authorPhilipp Holzer <admin@philipp.info>
Tue, 26 Feb 2019 13:24:38 +0000 (14:24 +0100)
committerPhilipp Holzer <admin@philipp.info>
Tue, 26 Feb 2019 13:24:38 +0000 (14:24 +0100)
diaspora/Diaspora_Connection.php

index 67bc63df0bff8c7786d34133f2a2a3df95ceb489..a33bf608950f1ef8a4f9b6d546dc1d8d8103d595 100644 (file)
@@ -46,7 +46,11 @@ class Diaspora_Connection {
        public function setDiasporaID($id) {
                $parts = explode('@', $id);
                $this->user = $parts[0];
-               $this->host = $parts[1];
+               if (count($parts) > 1) {
+                       $this->host = $parts[1];
+               } else {
+                       $this->host = '';
+               }
        }
 
        public function getDiasporaID() {