Skip to content
Snippets Groups Projects
Commit 5f8b5fa3 authored by Dave Reid's avatar Dave Reid
Browse files

Issue #769084: Fixed use of isset() rather than !empty() causes import...

Issue #769084: Fixed use of isset() rather than !empty() causes import problems with _parser_common_syndication_RSS20_parse().
parent b9dd6a0e
No related branches found
No related tags found
No related merge requests found
...@@ -400,7 +400,7 @@ function _parser_common_syndication_RSS20_parse($feed_XML) { ...@@ -400,7 +400,7 @@ function _parser_common_syndication_RSS20_parse($feed_XML) {
if (!empty($news['author'])) { if (!empty($news['author'])) {
$original_author = "{$news['author']}"; $original_author = "{$news['author']}";
} }
elseif (isset($dc["creator"])) { elseif (!empty($dc["creator"])) {
$original_author = (string)$dc["creator"]; $original_author = (string)$dc["creator"];
} }
...@@ -409,11 +409,11 @@ function _parser_common_syndication_RSS20_parse($feed_XML) { ...@@ -409,11 +409,11 @@ function _parser_common_syndication_RSS20_parse($feed_XML) {
$guid = $original_url; $guid = $original_url;
} }
if (isset($news['guid'])) { if (!empty($news['guid'])) {
$guid = "{$news['guid']}"; $guid = "{$news['guid']}";
} }
if (isset($georss['featureName'])) { if (!empty($georss['featureName'])) {
$geoname = "{$georss['featureName']}"; $geoname = "{$georss['featureName']}";
} }
...@@ -421,7 +421,7 @@ function _parser_common_syndication_RSS20_parse($feed_XML) { ...@@ -421,7 +421,7 @@ function _parser_common_syndication_RSS20_parse($feed_XML) {
$lon = $lon =
$latlon = $latlon =
$geoname = NULL; $geoname = NULL;
if (isset($georss['point'])) { if (!empty($georss['point'])) {
$latlon = explode(' ', $georss['point']); $latlon = explode(' ', $georss['point']);
$lat = "{$latlon[0]}"; $lat = "{$latlon[0]}";
$lon = "{$latlon[1]}"; $lon = "{$latlon[1]}";
...@@ -452,7 +452,7 @@ function _parser_common_syndication_RSS20_parse($feed_XML) { ...@@ -452,7 +452,7 @@ function _parser_common_syndication_RSS20_parse($feed_XML) {
$item['title'] = _parser_common_syndication_title($title, $body); $item['title'] = _parser_common_syndication_title($title, $body);
$item['description'] = $body; $item['description'] = $body;
$item['author_name'] = $original_author; $item['author_name'] = $original_author;
if (isset($news['pubDate'])) { if (!empty($news['pubDate'])) {
$item['timestamp'] = _parser_common_syndication_parse_date($news['pubDate']); $item['timestamp'] = _parser_common_syndication_parse_date($news['pubDate']);
} }
else { else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment