Skip to content

Commit 453b29e

Browse files
committed
Extractor::saveImage returns bool|string now (filePath or failure)
1 parent 3b0bb53 commit 453b29e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/UserData/Extractor/Extractor.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,14 +298,12 @@ public function saveImage($savePath, $width = FALSE, $height = FALSE)
298298

299299
try
300300
{
301-
Image::fromData($this->getImageRawData($width, $height))->save($savePath, $ext);
301+
return Image::fromData($this->getImageRawData($width, $height))->save($savePath, $ext);
302302
} // Catch any exception
303303
catch (\Exception $e)
304304
{
305305
throw new Exception('Exception occurred during saving image: ' . $e->getMessage(), $e->getCode(), $e);
306306
}
307-
308-
return $this;
309307
}
310308

311309
/**

src/UserData/Extractor/ExtractorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public function getExtras();
257257
* @param $savePath
258258
* @param bool $width Optional value, max width
259259
* @param bool $height Optional value, max height
260-
* @return $this
260+
* @return bool|string File path if success, false if failure
261261
* @throws Exception
262262
*/
263263
public function saveImage($savePath, $width = FALSE, $height = FALSE);

0 commit comments

Comments
 (0)