Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
database system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
2 Nov 2008 at 20:45 UTC
Updated:
22 Nov 2008 at 20:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
damien tournoud commented#329225: PHP Warnings when adding configurable actions. was a duplicate.
Comment #2
boombatower commentedTalked with chx and decided upon following.
Comment #3
boombatower commentedFixed else if -> elseif
and got rid of stuff for other patch.
Comment #4
webchickFrom #drupal:
* else if should be elseif
* count() is slow; just elseif ($this->defaultFields) will do.
Comment #5
boombatower commentedRemoved count() from both for consistency.
and fixed tabbing in pgsql file.
Comment #6
webchickConfirmed all database tests pass, code looks good, although it'd be nice for Crell to have a look at it when he's around. However, we need to get those tests passing again. :)
Committed to 7.x. Thanks!
Comment #7
Crell commentedHow were we even getting this? Was this caused by the insertFields array being empty? Right now calling InsertQuery::execute() without fields is a bug in the calling code. Having it insert a default row instead is NOT the way to fix it. Having it not insert at all is the way to fix it, or else throwing an exception.
Unless I'm misunderstanding this issue entirely we just traded one bug for another.
Comment #8
webchickOk. Rolled back that patch. Let's try again. :)
Comment #9
drewish commentedis this a duplicate of #321056: PHP warnings using db_insert('actions_aid')->execute() in actions_save()?
Comment #10
Crell commentedHm, could be, drewish. That's probably how we're generating the case that is causing this error. And #321100: Empty insert statements should fail gracefully (which no one even told me about, bah!) seems to be trying to fix it, sort of.
Comment #11
chx commentedOK, so I copied
simpletest, Dave reid suggested it in sister issue anyways. I like this solution as it does not require mucking with the DB layer for a fringe edge case.
Comment #12
webchickCrell pointed out in #drupal that this is the same construct SimpleTest uses for a similar purpose, so the fix seems correct to me.
Confirmed that this fixes the problem, so committed. We should now be down to 0 test failures again. YEE HAW! :)
Comment #13
hswong3i commentedWell... So I will mark #321056: PHP warnings using db_insert('actions_aid')->execute() in actions_save() as duplicated...
Comment #14
webchickYes, sorry about that. This issue was technically the duplicate. We just were trying really quickly to get the tests passing again, and since this one was linked from the original issue I found this one first. :\