Closed (fixed)
Project:
ImageCache Profiles
Version:
5.x-1.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Nov 2008 at 09:53 UTC
Updated:
8 Mar 2010 at 17:00 UTC
The variable $alt is set in line 43 of the imagecache_profiles.module. But this means, that it is set only if the user has uploaded an own user-picture. If he hasn't and is using the default picture, the variable $alt is not set. Nonetheless it is used in lines 53 and 54.
My proposal is to take line 43 in front of line 42 and so to change the lines 42-56 from
if ($account->picture && file_exists($account->picture)) {
$alt = t("@user's picture", array('@user' => $account->name ? $account->name : variable_get('anonymous', t('Anonymous'))));
if (isset($size)) {
$picture = theme('imagecache', $size, $account->picture, $alt, $alt);
} else {
$picture = theme('image', file_create_url($account->picture), $alt, $alt, '', FALSE);
}
} else if (variable_get('user_picture_default', '')) {
$picture = variable_get('user_picture_default', '');
if (isset($size)) {
$picture = theme('imagecache', $size, $picture, $alt, $alt);
} else {
$picture = theme('image', file_create_url($picture), $alt, $alt, '', FALSE);
}
}
to
$alt = t("@user's picture", array('@user' => $account->name ? $account->name : variable_get('anonymous', t('Anonymous'))));
if ($account->picture && file_exists($account->picture)) {
if (isset($size)) {
$picture = theme('imagecache', $size, $account->picture, $alt, $alt);
} else {
$picture = theme('image', file_create_url($account->picture), $alt, $alt, '', FALSE);
}
} else if (variable_get('user_picture_default', '')) {
$picture = variable_get('user_picture_default', '');
if (isset($size)) {
$picture = theme('imagecache', $size, $picture, $alt, $alt);
} else {
$picture = theme('image', file_create_url($picture), $alt, $alt, '', FALSE);
}
}
Comments
Comment #1
andypostPlease provide patch
Comment #2
andyposthttp://drupal.org/cvs?commit=332150