Problem/Motivation
The nodequeue_subqueue_position function fails as it uses an old db_query method. Calling nodequeue_subqueue_position($sqid, $nid) results in Recoverable fatal error: Argument 2 passed to db_query() must be an array, string given
Proposed resolution
Update the function with the new syntax
function nodequeue_subqueue_position($sqid, $nid) {
return db_query("SELECT position FROM {nodequeue_nodes} WHERE sqid = :sqid AND nid =:nid", array(
':sqid' => $sqid,
':nid' => $nid,
))->fetchField();
}
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | nodequeue_subqueue_position-1269802-1.patch | 673 bytes | queenvictoria |
Comments
Comment #1
queenvictoria commentedPatch attached
Comment #2
mrharolda commentedMarking it as RTBC!
Since this raises a "Recoverable fatal error", I'm also bumping the priority to 'Critical'.
Comment #3
seworthi commentedWorks great.
Comment #4
amateescu commentedCommited a slightly modified patch to 7.x-2.x. Thanks for spotting this and for the patch :)
http://drupalcode.org/project/nodequeue.git/commitdiff/52e999d