Skip to content
Snippets Groups Projects
Commit c65b7449 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #1036718 by montesq: incorrect watchdog log messages.

parent 0cc5d8ad
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -74,7 +74,7 @@ function image_image_effect_info() { ...@@ -74,7 +74,7 @@ function image_image_effect_info() {
*/ */
function image_resize_effect(&$image, $data) { function image_resize_effect(&$image, $data) {
if (!image_resize($image, $data['width'], $data['height'])) { if (!image_resize($image, $data['width'], $data['height'])) {
watchdog('image', 'Image resize failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['height'] . 'x' . $image->info['height']), WATCHDOG_ERROR); watchdog('image', 'Image resize failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['width'] . 'x' . $image->info['height']), WATCHDOG_ERROR);
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -109,7 +109,7 @@ function image_scale_effect(&$image, $data) { ...@@ -109,7 +109,7 @@ function image_scale_effect(&$image, $data) {
$data['height'] = empty($data['height']) ? PHP_INT_MAX : $data['height']; $data['height'] = empty($data['height']) ? PHP_INT_MAX : $data['height'];
if (!image_scale($image, $data['width'], $data['height'], $data['upscale'])) { if (!image_scale($image, $data['width'], $data['height'], $data['upscale'])) {
watchdog('image', 'Image scale failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['height'] . 'x' . $image->info['height']), WATCHDOG_ERROR); watchdog('image', 'Image scale failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['width'] . 'x' . $image->info['height']), WATCHDOG_ERROR);
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -143,7 +143,7 @@ function image_crop_effect(&$image, $data) { ...@@ -143,7 +143,7 @@ function image_crop_effect(&$image, $data) {
$x = image_filter_keyword($x, $image->info['width'], $data['width']); $x = image_filter_keyword($x, $image->info['width'], $data['width']);
$y = image_filter_keyword($y, $image->info['height'], $data['height']); $y = image_filter_keyword($y, $image->info['height'], $data['height']);
if (!image_crop($image, $x, $y, $data['width'], $data['height'])) { if (!image_crop($image, $x, $y, $data['width'], $data['height'])) {
watchdog('image', 'Image crop failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['height'] . 'x' . $image->info['height']), WATCHDOG_ERROR); watchdog('image', 'Image crop failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['width'] . 'x' . $image->info['height']), WATCHDOG_ERROR);
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -165,7 +165,7 @@ function image_crop_effect(&$image, $data) { ...@@ -165,7 +165,7 @@ function image_crop_effect(&$image, $data) {
*/ */
function image_scale_and_crop_effect(&$image, $data) { function image_scale_and_crop_effect(&$image, $data) {
if (!image_scale_and_crop($image, $data['width'], $data['height'])) { if (!image_scale_and_crop($image, $data['width'], $data['height'])) {
watchdog('image', 'Image scale and crop failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['height'] . 'x' . $image->info['height']), WATCHDOG_ERROR); watchdog('image', 'Image scale and crop failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['width'] . 'x' . $image->info['height']), WATCHDOG_ERROR);
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -184,7 +184,7 @@ function image_scale_and_crop_effect(&$image, $data) { ...@@ -184,7 +184,7 @@ function image_scale_and_crop_effect(&$image, $data) {
*/ */
function image_desaturate_effect(&$image, $data) { function image_desaturate_effect(&$image, $data) {
if (!image_desaturate($image)) { if (!image_desaturate($image)) {
watchdog('image', 'Image desaturate failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['height'] . 'x' . $image->info['height']), WATCHDOG_ERROR); watchdog('image', 'Image desaturate failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['width'] . 'x' . $image->info['height']), WATCHDOG_ERROR);
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -237,7 +237,7 @@ function image_rotate_effect(&$image, $data) { ...@@ -237,7 +237,7 @@ function image_rotate_effect(&$image, $data) {
} }
if (!image_rotate($image, $data['degrees'], $data['bgcolor'])) { if (!image_rotate($image, $data['degrees'], $data['bgcolor'])) {
watchdog('image', 'Image rotate failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['height'] . 'x' . $image->info['height']), WATCHDOG_ERROR); watchdog('image', 'Image rotate failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['width'] . 'x' . $image->info['height']), WATCHDOG_ERROR);
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment