diff options
author | Maryana Rozhankivska <mariroz@mr.lviv.ua> | 2014-05-29 16:35:00 +0300 |
---|---|---|
committer | Maryana Rozhankivska <mariroz@mr.lviv.ua> | 2014-05-29 16:35:00 +0300 |
commit | 3dc8d84229ed0f3ccd40b44420ed6e818a6edea9 (patch) | |
tree | 9b582994b5164d668a3773c69a019ac04a6123ac /inc/3rdparty | |
parent | 0b9bb8cb7868f24137c5d8b85c39cc88ea877411 (diff) | |
download | wallabag-3dc8d84229ed0f3ccd40b44420ed6e818a6edea9.tar.gz wallabag-3dc8d84229ed0f3ccd40b44420ed6e818a6edea9.tar.zst wallabag-3dc8d84229ed0f3ccd40b44420ed6e818a6edea9.zip |
fix of uninitialized object warning, issue #710
Diffstat (limited to 'inc/3rdparty')
-rwxr-xr-x | inc/3rdparty/libraries/feedwriter/FeedWriter.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/inc/3rdparty/libraries/feedwriter/FeedWriter.php b/inc/3rdparty/libraries/feedwriter/FeedWriter.php index 77755690..aa064afb 100755 --- a/inc/3rdparty/libraries/feedwriter/FeedWriter.php +++ b/inc/3rdparty/libraries/feedwriter/FeedWriter.php | |||
@@ -97,13 +97,16 @@ define('JSONP', 3, true); | |||
97 | header('X-content-type-options: nosniff'); | 97 | header('X-content-type-options: nosniff'); |
98 | } elseif ($this->version == JSON) { | 98 | } elseif ($this->version == JSON) { |
99 | header('Content-type: application/json; charset=UTF-8'); | 99 | header('Content-type: application/json; charset=UTF-8'); |
100 | $this->json = new stdClass(); | ||
101 | } elseif ($this->version == JSONP) { | 100 | } elseif ($this->version == JSONP) { |
102 | header('Content-type: application/javascript; charset=UTF-8'); | 101 | header('Content-type: application/javascript; charset=UTF-8'); |
103 | $this->json = new stdClass(); | ||
104 | } | 102 | } |
105 | } | 103 | } |
106 | 104 | ||
105 | if ($this->version == JSON || $this->version == JSONP) { | ||
106 | $this->json = new stdClass(); | ||
107 | } | ||
108 | |||
109 | |||
107 | $this->printHead(); | 110 | $this->printHead(); |
108 | $this->printChannels(); | 111 | $this->printChannels(); |
109 | $this->printItems(); | 112 | $this->printItems(); |
@@ -202,7 +205,7 @@ define('JSONP', 3, true); | |||
202 | public function setDescription($description) | 205 | public function setDescription($description) |
203 | { | 206 | { |
204 | $tag = ($this->version == ATOM)? 'subtitle' : 'description'; | 207 | $tag = ($this->version == ATOM)? 'subtitle' : 'description'; |
205 | $this->setChannelElement($tag, $desciption); | 208 | $this->setChannelElement($tag, $description); |
206 | } | 209 | } |
207 | 210 | ||
208 | /** | 211 | /** |