I tried creating a queue item and it happened it had an uid parameter set to FALSE. I got a db exception on cron run. It's caused by:

AdvancedQueue::createUniqueItem(), exactly:

uid' => is_array($data) && isset($data['uid']) ? $data['uid'] : $GLOBALS['user']->uid,

Drupal cron queue API doesn't include an uid parameter that'd mean something (at least it's not documented on https://api.drupal.org/api/drupal/modules%21system%21system.queue.inc/fu...), it's also not documented in the advancedqueue module so this may lead to unexpected behaviour if 'uid' is not actually Drupal user ID.

Comments

Graber created an issue. See original summary.

graber’s picture

To think of it, the passed uid doesn't have to be uid of the user that created the queue item but an uid of some entity associated with the queue item - possibilities are endless.

alexpott’s picture

Status: Active » Closed (outdated)

This code is no longer present in the 8.x-1.x version therefore and that version is no longer supported so closing this issue.