While working on this #1417520: Fire hook_field_load and hook_field_attach_load for fields when aggregation is used. I came across the notice Array given, but string expected as argument 1 for unserialize() in _link_load():315.
This happens because the view's patch I'm working on fires hook_field_load() and hook_field_attach_load to ensure the data are consistent after the rewrites took place.
I'd suggest to add a condition before user unserialize to avoid such errors.
In my eyes a second call to _link_load() shouldn't lead to an error (even if I know it's hackish what I try to do with views ;) ).
The attached patch might also solve this issue #1374928: Array given, but string expected as argument 1 for unserialize() in _link_load():315 (when title-attribute is user defined)
The patch contains:
- Condition before
unserializein_link_load() link_views_handler_argument_target::query()is now compatible to its parent to avoid php strict notices- Traling whitespaces removed as described in the coding standards.
| Comment | File | Size | Author |
|---|---|---|---|
| link-dont-unserialzed-already-unserialzed-attributes.diff | 3.03 KB | das-peter |
Comments
Comment #1
dqdwhy wasting time ... ?
reviewed, tested, committed and pushed against latest --dev :-)
thanks das-peter!
das-peter++
Comment #2
das-peter commentedThanks Digidog :)
I set the status to fixed - that way it will be visible for the next two weeks under "open issues".
That helps users to find this issue if they hit a similar problem.
The bot should mark it as closed (fixed) after two weeks of inactivity.
Comment #3
dqdwas in a rush.
thanks for doing it for me :-)