Currently there is an API difference between the $redirect variable returned from path_redirect_load() and the one used by path_redirect_save(). This causes redirects to not save properly because of a MySQL error when trying to do something like the following:
$redirect = path_redirect_load(1);
path_redirect_save($redirect);
You receive the error:
Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in db_escape_string() (line 321 of /Users/nate/Sites/drupal6/includes/database.mysql.inc).
And the update fails when trying to put an array into a string placeholder.
This patch makes these two functions work better with each other, just by converting query arrays back into strings before doing the update.
| Comment | File | Size | Author |
|---|---|---|---|
| path_redirect_load_save.patch | 747 bytes | quicksketch |
Comments
Comment #1
dave reidCommitted with another fix for loading cleanup in http://drupal.org/cvs?commit=432338
Thanks Nate!