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 unserialize in _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.

Comments

dqd’s picture

Status: Needs review » Closed (fixed)

why wasting time ... ?
reviewed, tested, committed and pushed against latest --dev :-)

thanks das-peter!
das-peter++

das-peter’s picture

Status: Closed (fixed) » Fixed

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

dqd’s picture

was in a rush.
thanks for doing it for me :-)

Status: Fixed » Closed (fixed)

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