Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Mar 2010 at 23:05 UTC
Updated:
27 Mar 2010 at 04:06 UTC
Jump to comment: Most recent file
Comments
Comment #1
marcingy commentedPatch to amend unpack so as the data that was unorginally serialized is unserialized and can be subsquentally saved without generating unpack errors when it is reserialised.
Comment #2
marcingy commentedComment #3
marcingy commentedAfter speaking to chx this approach is totally wrong but as it stands enabling the contact module is going to produce drupal_unpack errors after the first save.
Comment #4
chx commentedChanging a function like that this late? That's a recipe for catastrophe. What about this, however?
Comment #5
chx commentedIt broke http://drupalcode.org/viewvc/drupal/drupal/modules/user/user.module?r1=1... here.
Comment #6
marcingy commentedMuch nicer than my solution. Tested locally if the bot goes green this can be set to RBTC.
Comment #7
marcingy commentedComment #8
catchLooks good if the testbot comes back green, I got fails before doing it this way 'round, but some other fixes have gone in since then so we might be alright by now.
Comment #10
catchThe issue is at the moment $account->data can sometimes be an array, sometimes unserialized.
Either we add a tonne of cruft in user_save() to check for all the possibilities, or we could see how marcingy's approach works. Let's at least see what happens with the test bot on that patch, since to me having that data as an actual array seems like the right fix here and no explanation has been given why it's such a bad idea.
Additionally this is a duplicate of #721436: Remove magical fairy saving of cruft from user_save() which is still open for cleanups.