Skip to content
Snippets Groups Projects
Commit c76bc9ed authored by Alex Barth's avatar Alex Barth
Browse files

Fix notices.

parent 0c53e0da
No related branches found
No related tags found
No related merge requests found
......@@ -237,10 +237,10 @@ class FeedsDateTimeElement extends FeedsElement {
protected static function readDateField($node, $field_name) {
$field = content_fields($field_name);
$ret = new FeedsDateTimeElement();
if ($node->{$field_name}[0]['date'] instanceof FeedsDateTime) {
if (isset($node->{$field_name}[0]['date']) && $node->{$field_name}[0]['date'] instanceof FeedsDateTime) {
$ret->start = $node->{$field_name}[0]['date'];
}
if ($node->{$field_name}[0]['date2'] instanceof FeedsDateTime) {
if (isset($node->{$field_name}[0]['date2']) && $node->{$field_name}[0]['date2'] instanceof FeedsDateTime) {
$ret->end = $node->{$field_name}[0]['date2'];
}
return $ret;
......
......@@ -75,9 +75,9 @@ class FeedsSimplePieParser extends FeedsParser {
$item['guid'] = $item['url'];
}
$author = $simplepie_item->get_author();
$item['author_name'] = html_entity_decode($author->name);
$item['author_link'] = $author->link;
$item['author_email'] = $author->email;
$item['author_name'] = isset($author->name) ? html_entity_decode($author->name) : '';
$item['author_link'] = isset($author->link) ? $author->link : '';
$item['author_email'] = isset($author->email) ? $author->email : '';
// Enclosures
$enclosures = $simplepie_item->get_enclosures();
if (is_array($enclosures)) {
......
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