Drupal 6.26
Revisioning 6.x-3.15
Link 6.x-2.9

I have enabled revisoning for a node type - let's call it "Profile". Node also has field cck link field for storing web urls.

WHen you try to "Publish this" revision - mysql error happens:

warning: mysql_real_escape_string() expects parameter 1 to be string, array given in C:\WEB\drupal6\includes\database.mysql.inc 

If I leave the Link field empty - then error does not happen.
I tried to figure out the problem and it seams to be with the "attributes" property of the Link field. It is empty array at the point of saving and this is why the mysql error happenes.

Probably it should be serialized at the point of saving the node revision?

CommentFileSizeAuthor
#1 link-nodeapi_update_fix-1637434.patch349 bytesNor4a
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nor4a’s picture

Here comes the patch - seams to fix the issue.

pokermoneyclips’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)

I noticed that the code from the patch
case 'update':
was included in the latest link 6.x-2.10 update from this post - https://drupal.org/node/268891
Different error message, but same patched code.