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

Do not node_load() if feed_nid is 0.

parent 8d7aefaf
No related branches found
No related tags found
No related merge requests found
...@@ -125,7 +125,9 @@ abstract class FeedsParser extends FeedsPlugin { ...@@ -125,7 +125,9 @@ abstract class FeedsParser extends FeedsPlugin {
* @see FeedsCSVParser::getSourceElement(). * @see FeedsCSVParser::getSourceElement().
*/ */
public function getSourceElement(FeedsSource $source, FeedsParserResult $result, $element_key) { public function getSourceElement(FeedsSource $source, FeedsParserResult $result, $element_key) {
if (($node = node_load($source->feed_nid)) && $element_key == 'parent:uid') { if ($element_key == 'parent:uid' &&
$source->feed_nid &&
($node = node_load($source->feed_nid))) {
return $node->uid; return $node->uid;
} }
$item = $result->currentItem(); $item = $result->currentItem();
......
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