function feedapi_create_node($param, $url) {
if (is_object($param)) {
$node = $param;
}
else {
$node = new stdClass();
$node->type = $param;
}
if (!feedapi_enabled_type($node->type)) {
return FALSE;
}
$feed = _feedapi_build_feed_object($node->type, $url);
if (!$feed->title && !$node->title) {
return FALSE;
}

This will always fail if the $param is a not an obj. Since the $node->title is never set.

Comments

aron novak’s picture

Assigned: Unassigned » aron novak
Status: Active » Postponed (maintainer needs more info)

The following code works fine:

dprint_r(feedapi_create_node('feed', 'http://blogsearch.google.hu/blogsearch_feeds?hl=hu&lr=&q=gotham+city&ie=utf-8&num=10&output=rss'));

It will only fail (and it is a sane behaviour) when the feed does not contain a title itself.
Can you paste here the code line what you use?