DBTNG no longer supports chaining on db_select(), so lines 286-290 of actions.inc don't work.
The code currently reads:
$results = db_select('actions')
->addField('actions', 'aid')
->addField('actions', 'description')
->condition('callback', $orphaned, 'IN')
->execute();
We probably want something more like:
$query = db_select('actions');
$query->addField('actions', 'aid');
$query->addField('actions', 'description');
$query->condition('callback', $orphaned, 'IN');
$results = $query->execute();
However, if #314464: Convert db_placeholders() to DBTNG is resolved, this should probably be changed into a static query using db_query() rather than db_select().
Comments
Comment #1
dave reidYeah that was my bad. I didn't know that db_select couldn't be chained like db_insert/update/delete...
Comment #2
dave reidAssigning myself to fix this.
Comment #4
dave reidComment #5
dave reidComment #6
mr.baileysI ran into this issue while working on #306662: Add redirect option to site-wide contact forms.
@Dave Reid, I hope you don't mind but since I had to get past this error I rolled a patch according to cwgordon7's instructions...
Comment #7
cwgordon7 commentedWell, since #314464: Convert db_placeholders() to DBTNG has been resolved, I believe this query can probably be converted to a static db_query() query?
Comment #8
dave reid@mr.baileys No problem at all. :)
Agreed with cwgordon7. This can be a nice db_query()->fetchAll() function now.
Comment #9
mr.baileysre-rolled taking the comments from #7 and #8 into account. If this gets commited, credit goes to Dave Reid and cwgordon7, as I merely poured their code into patch-form.
Comment #10
mr.baileysLet's use single-quotes instead :)
Comment #11
dave reidTested manually and works, looks good, and testbot likes. We have more extensive tests for orphaned actions coming.
Comment #12
dries commentedCommitted -- and looking forward to those tests. :-)