diff --git a/app/models/contact/Contact.php b/app/models/contact/Contact.php index 7138027d4..4f5704ba6 100644 --- a/app/models/contact/Contact.php +++ b/app/models/contact/Contact.php @@ -198,7 +198,7 @@ class Contact extends ModlModel { public function setLocation($stanza) { $this->loclatitude = (string)$stanza->items->item->geoloc->lat; $this->loclongitude = (string)$stanza->items->item->geoloc->lon; - $this->localtitude = (string)$stanza->items->item->geoloc->alt; + $this->localtitude = (int)$stanza->items->item->geoloc->alt; $this->loccountry = (string)$stanza->items->item->geoloc->country; $this->loccountrycode = (string)$stanza->items->item->geoloc->countrycode; $this->locregion = (string)$stanza->items->item->geoloc->region; diff --git a/system/User.php b/system/User.php index d87b600b2..90bc4e37b 100644 --- a/system/User.php +++ b/system/User.php @@ -27,7 +27,9 @@ class User { if($this->isLogged()) { global $session; $this->username = $session['user'].'@'.$session['host']; - $this->config = $session['config']; + + if(isset($session['config'])) + $this->config = $session['config']; $this->sizelimit = (int)\system\Conf::getServerConfElement('sizeLimit'); diff --git a/system/widget/WidgetWrapper.php b/system/widget/WidgetWrapper.php index 178c6504d..59ff392b0 100644 --- a/system/widget/WidgetWrapper.php +++ b/system/widget/WidgetWrapper.php @@ -181,6 +181,7 @@ class WidgetWrapper if(array_key_exists($key, $this->registered_events)) { $we = $this->registered_events[$key]; array_push($we, $widget_name); + $we = array_unique($we); $this->registered_events[$key] = $we; } else { $this->registered_events[$key] = array($widget_name); @@ -208,7 +209,6 @@ class WidgetWrapper $widgets = $this->registered_events[$fct]; } else $widgets = $this->get_loaded_widgets(); - if(isset($widgets) && is_array($widgets)) foreach($widgets as $widget) $this->run_widget($widget, $method, $params);