warning: unserialize() expects parameter 1 to be string, array given in /opt/lampp/htdocs/asokhoah/sites/all/modules/lightbox2/lightbox2.formatter.inc on line 138.
Using imagefield 6.x-3.0-alpha2 in nodes, I'm getting one of those for each imagefield image in the node.
Similar issue with this on imagecache btw, with an interesting discussion: http://drupal.org/node/299329 , wich led me to try out the following:
replaced:
$image_data = unserialize($item['data']);
with this:
if (is_string($item['data'])) {
$image_data = unserialize($item['data']);
}
Which does get rid of the error, but if you use the titles don't get passed as captions... not a developer myself though.
If you have it setup to display the link to the node as caption, the html is printed out as plain text also. Maybe this gives u a clue?
Comment | File | Size | Author |
---|---|---|---|
#1 | lightbox2_303101.patch | 991 bytes | stella |
Comments
Comment #1
stella CreditAttribution: stella commentedFixed in CVS and will be included in the next dev release, available later today.
I think the problem with your change is that $image_data is not set if $item['data'] isn't a string. See if the next dev version or the attached patch fixes this for you.
Cheers,
Stella
Comment #2
Manuel Garcia CreditAttribution: Manuel Garcia commentedI added the line
drupal_set_message(dprint_r($item['data'], 1));
above the
unserialize()
function call, and this is what gets printed:Comment #3
Manuel Garcia CreditAttribution: Manuel Garcia commentedow ok, we were replying at the same time, sorry
will try out what you suggest and come back to you on it
Comment #4
stella CreditAttribution: stella commentedIs the patch not working? If so, how not?
Comment #5
Manuel Garcia CreditAttribution: Manuel Garcia commentedgreat that patch works perfectly - many thanks!
I guess we can close this one right :)
Comment #6
stella CreditAttribution: stella commentedComment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #8
stella CreditAttribution: stella commentedReleased in Lightbox2 6.x-1.9.
Cheers,
Stella