I'm using views to show multiple screenshots from every field listed. And i get this error:

Warning: htmlspecialchars() expects parameter 1 to be string, array given em check_plain() (linha 1154 em /home/mysite/includes/bootstrap.inc)

After a little debugging with the help of abaddon in IRC, it seems for some reason highslide is passing to

theme('image'....

$alt as an array. And check_plain, which is in imagecache' main theme function, cant check for arrays.

To fix it, after finding this line in highslide.module:

return strpos($thumb, '/imagecache/') ? theme('image', $thumb, $alt, $title, $attributes) : theme('imagecache', 'highslide_thumb', $thumb, $alt, $title, $attributes);

I've put above it this line:

if (is_array($alt)){ $alt = '';};

And the errors are gone.

Comments

Fidelix’s picture

Status: Needs review » Active

Well, it seems i was wrong.

I dont know how the errors returned, but they did.

the line of code above is worthless (i think).

I'm out of ideas.

Fidelix’s picture

if (is_array($alt)) {$alt = '';};
if (is_array($title)) {$title = '';};

Putting that before:

return '<img src="'. $imagecache_url .'" alt="'. check_plain($alt) .'" title="'. check_plain($title) .'" '. $attributes .' />';

in imagecache.module anihilates the error. But its not the proper way to fix it.

q0rban’s picture

Status: Active » Postponed (maintainer needs more info)

Hmm, I'm not sure why this is happening. We use Highslide and Views together with the 'Group multiple values' setting all the time.

q0rban’s picture

Hmm, I'm not sure why this is happening. We use Highslide and Views together with the 'Group multiple values' setting all the time.

Fidelix’s picture

Maybe this is from Imagefield.

My drupal installation has alt text and title text disabled, just FYI