When using sqlsrv with PHP 5.4.0 I encountered a few error messages. The following messages were flooding watchdog:
Warning: Illegal string offset 'field' in UpdateQuery_sqlsrv->removeFieldsInCondition() (Zeile 168 von \includes\database\sqlsrv\query.inc).
Warning: Illegal string offset 'field' in UpdateQuery_sqlsrv->removeFieldsInCondition() (Zeile 172 von \includes\database\sqlsrv\query.inc).
I found that the same problem already existed for SQLIte and the following patch also works for sqlsrv:
http://drupal.org/node/1414412#comment-5899380
Of course you can't apply the patch directly, but the method is exactly the same in sqlsrv. And the extra "if" solved the problem. Sorry for not providing a patch. I must admit that I couldn't manage to create one :(
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | sqlsrv-1635002-4.patch | 1.28 KB | dmitriy.trt |
| #1 | sqlsrv_query.inc_.patch | 1.09 KB | Sixfold |
Comments
Comment #1
Sixfold commentedThis problem still exists, so I created a patch to fix it.
Please help me test this patch.
Comment #2
benestocapio commentedthanks sixfold, your patch worked for me.
Comment #3
corniquet commentedThanks sixfold. it worked for me too.
Tested with Drupal 7.15, drupal commerce kickstart 2.0 rc1, Sql Server 2012 express, php 5.4.7
Comment #4
dmitriy.trt commentedRe-roll on top of the latest git code. Author is still Sixfold, I've just prepared it for committing to the project.
Comment #5
askildolsen commentedPatch from #4 (applied manually) works for me.
Tested with Drupal 7.17 on IIS 7.5 with PHP 5.4.9 and SQL Server 2012.
Comment #6
damien tournoud commentedI merged 655c154 into 7.x-1.x, that actually just removes this code. See #1266572: Workaround in UpdateQuery_sqlite for affected rows count causes certain updates to be suppressed for details.