From 1128f2ee2379a8473a36631c51b7c2dfb39c0651 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Wed, 11 Jun 2014 20:58:37 +0000
Subject: [PATCH] [mod_pogoda] Poprawienie dwóch różnych wywołań metody na nieistniejącym obiekcie w handlerze
---
modules/30_pogoda/handler.php | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/30_pogoda/handler.php b/modules/30_pogoda/handler.php
index ac77828..5a11706 100644
--- a/modules/30_pogoda/handler.php
+++ b/modules/30_pogoda/handler.php
@@ -139,8 +139,10 @@
$arg = trim($msg->args);
}
+ $out = new BotMsg();
+
if(empty($arg)) {
- if(isset($this->session->miasto)) {
+ if(isset($msg->session->miasto)) {
return new BotMsg('Aktualnie ustawione miejsce to: '.htmlspecialchars($this->session->miasto).', '.htmlspecialchars($this->session->countryName));
}
@@ -161,7 +163,7 @@
}
else
{
- $out = new BotMsg();
+
}
$api = new api_geonames();
--
Gitblit v1.9.1