function _image_imagemagick_check_path in Image 6
Same name and namespace in other branches
- 5.2 image.imagemagick.inc \_image_imagemagick_check_path()
- 5 image.imagemagick.inc \_image_imagemagick_check_path()
- 7 image.imagemagick.inc \_image_imagemagick_check_path()
2 calls to _image_imagemagick_check_path()
File
- ./
image.imagemagick.inc, line 53
Code
function _image_imagemagick_check_path($path, $attach_error_to = FALSE) {
if (file_exists($path)) {
return TRUE;
}
if ($attach_error_to) {
if ($open_basedir = ini_get('open_basedir')) {
form_set_error($attach_error_to, t("No file %file could be found. PHP's <a href='@open_basedir'>open_basedir</a> security restriction is set to %open_basedir, which may be interfering with the attempts to locate ImageMagick.", array(
'%file' => $path,
'%open_basedir' => $open_basedir,
'@open_basedir' => 'http://php.net/features.safe-mode#ini.open-basedir',
)));
}
else {
form_set_error($attach_error_to, t('The specified ImageMagic path %file does not exist.', array(
'%file' => $path,
)));
}
}
return FALSE;
}