Skip to content

Commit f733f1e

Browse files
authored
Removed "was" from error messages (#2869)
1 parent fcb45a3 commit f733f1e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/Varien/Image/Adapter/Gd2.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@ private function _getCallback($callbackType, $fileType = null, $unsupportedText
227227
$fileType = $this->_fileType;
228228
}
229229
if (empty(self::$_callbacks[$fileType])) {
230-
throw new Exception("{$unsupportedText}. Type was: {$fileType}. File was: {$this->_fileName}");
230+
throw new Exception("{$unsupportedText}. Type: {$fileType}. File: {$this->_fileName}");
231231
}
232232
if (empty(self::$_callbacks[$fileType][$callbackType])) {
233-
throw new Exception("Callback not found. Callbacktype was: {$callbackType}. File was: {$this->_fileName}");
233+
throw new Exception("Callback not found. Callbacktype: {$callbackType}. File: {$this->_fileName}");
234234
}
235235
return self::$_callbacks[$fileType][$callbackType];
236236
}
@@ -245,17 +245,17 @@ private function _fillBackgroundColor(&$imageResourceTo)
245245
// fill truecolor png with alpha transparency
246246
if ($isAlpha) {
247247
if (!imagealphablending($imageResourceTo, false)) {
248-
throw new Exception('Failed to set alpha blending for PNG image. File was: {$this->_fileName}');
248+
throw new Exception('Failed to set alpha blending for PNG image. File: {$this->_fileName}');
249249
}
250250
$transparentAlphaColor = imagecolorallocatealpha($imageResourceTo, 0, 0, 0, 127);
251251
if (false === $transparentAlphaColor) {
252-
throw new Exception('Failed to allocate alpha transparency for PNG image. File was: {$this->_fileName}');
252+
throw new Exception('Failed to allocate alpha transparency for PNG image. File: {$this->_fileName}');
253253
}
254254
if (!imagefill($imageResourceTo, 0, 0, $transparentAlphaColor)) {
255-
throw new Exception('Failed to fill PNG image with alpha transparency. File was: {$this->_fileName}');
255+
throw new Exception('Failed to fill PNG image with alpha transparency. File: {$this->_fileName}');
256256
}
257257
if (!imagesavealpha($imageResourceTo, true)) {
258-
throw new Exception('Failed to save alpha transparency into PNG image. File was: {$this->_fileName}');
258+
throw new Exception('Failed to save alpha transparency into PNG image. File: {$this->_fileName}');
259259
}
260260

261261
return $transparentAlphaColor;
@@ -281,7 +281,7 @@ private function _fillBackgroundColor(&$imageResourceTo)
281281
list($r, $g, $b) = $this->_backgroundColor;
282282
$color = imagecolorallocate($imageResourceTo, $r, $g, $b);
283283
if (!imagefill($imageResourceTo, 0, 0, $color)) {
284-
throw new Exception("Failed to fill image background with color {$r} {$g} {$b}. File was: {$this->_fileName}");
284+
throw new Exception("Failed to fill image background with color {$r} {$g} {$b}. File: {$this->_fileName}");
285285
}
286286

287287
return $color;
@@ -329,7 +329,7 @@ private function _getTransparency($imageResource, $fileType, &$isAlpha = false,
329329
public function resize($frameWidth = null, $frameHeight = null)
330330
{
331331
if (empty($frameWidth) && empty($frameHeight)) {
332-
throw new Exception('Invalid image dimensions. File was: {$this->_fileName}');
332+
throw new Exception('Invalid image dimensions. File: {$this->_fileName}');
333333
}
334334

335335
// calculate lacking dimension

0 commit comments

Comments
 (0)