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 :(

Comments

Sixfold’s picture

StatusFileSize
new1.09 KB

This problem still exists, so I created a patch to fix it.
Please help me test this patch.

benestocapio’s picture

thanks sixfold, your patch worked for me.

corniquet’s picture

Version: 7.x-1.x-dev » 7.x-1.2
Status: Active » Patch (to be ported)

Thanks 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

dmitriy.trt’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new1.28 KB

Re-roll on top of the latest git code. Author is still Sixfold, I've just prepared it for committing to the project.

askildolsen’s picture

Patch 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.

damien tournoud’s picture

Status: Needs review » Fixed

I 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.