diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-10-11 19:43:23 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-10-11 19:43:23 +0000 |
commit | 918e818964b7dbce7fe0d31ce7d8f1af65d350d1 (patch) | |
tree | e58a18f3aa44116405c89336f56f922408183e8b /modules/user/user.module | |
parent | 2e226e9adfbba8d59056079201af9149c5597d5c (diff) | |
download | brdo-918e818964b7dbce7fe0d31ce7d8f1af65d350d1.tar.gz brdo-918e818964b7dbce7fe0d31ce7d8f1af65d350d1.tar.bz2 |
- Patch #937562 by tim.plunkett, chx, justinrandell: fatal Error Call to a member function getDirectoryPath() on a non-object when Default picture is set.
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 874efae6d..45ea7f280 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1409,7 +1409,9 @@ function template_preprocess_user_picture(&$variables) { } if (isset($filepath)) { $alt = t("@user's picture", array('@user' => format_username($account))); - if (module_exists('image') && $style = variable_get('user_picture_style', '')) { + // If the image does not have a valid Drupal scheme (for eg. HTTP), + // don't load image styles. + if (module_exists('image') && file_valid_uri($filepath) && $style = variable_get('user_picture_style', '')) { $variables['user_picture'] = theme('image_style', array('style_name' => $style, 'path' => $filepath, 'alt' => $alt, 'title' => $alt)); } else { |