When using PHP 5.4 with Nodequeue version 7.x-2.0-beta1+17-dev, a Strict Warning is received.

Strict warning: Only variables should be passed by reference in nodequeue_load_random_node() (line 1644 of .../sites/all/modules/contrib/nodequeue/nodequeue.module).

To remedy this, the line should be changed from:
return array_shift(nodequeue_load_nodes($sqid, TRUE, rand(0, $count - 1), 1));
To:

$nodequeue_load_nodes = nodequeue_load_nodes($sqid, TRUE, rand(0, $count -1), 1);
return array_shift($nodequeue_load_nodes);

Comments

kpastore’s picture

Or, I guess, you could just turn off the warnings. :D

kpastore’s picture

Issue summary: View changes

removed line number from code

brockfanning’s picture

Issue summary: View changes
StatusFileSize
new469 bytes

Here's a patch with the above fix.

brockfanning’s picture

Version: 7.x-2.0-beta1 » 7.x-2.x-dev
brockfanning’s picture

Status: Active » Closed (duplicate)
Related issues: +#2371203: Only variables should be passed by reference in nodequeue_load_front