Using drupal_queue for importing, there is a major failure on hook_cron(). This happens because the variable $queue is never instantiated.

Attached is the patch.

Would like to look into have FeedsScheduler::queue() always return FALSE when it shouldn't use the queue instead of NULL. But that doesn't have to get in this fix.

Without this patch, importing fails completely when you have drupal_queue module enabled.

Also, drupal_queue_get() function does the _include() callback already so no need for that inside this class. Doesn't get in the way and its not broken but when you port to D7 this will make it easier.

CommentFileSizeAuthor
feeds_queue_fail.patch954 bytesScott Reynolds
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alex_b’s picture

Status: Needs review » Fixed
alex_b’s picture

Would like to look into have FeedsScheduler::queue() always return FALSE when it shouldn't use the queue instead of NULL. But that doesn't have to get in this fix.

I do prefer NULL vs object as return value to FALSE vs object. The latter would be mixing return value types.

What are your thoughts?

Scott Reynolds’s picture

Ya I think your right. I interrupted $this->queue() as equilivent to $this->useQueue() which it isn't. Its creating an object and returning it (which of course it says in the php doc :-D). It is more consistent to have it return NULL.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.