Skip to content

Commit

Permalink
v3.1.1
Browse files Browse the repository at this point in the history
* Fix error on PHP 8.1 to check string only for source image path.
  • Loading branch information
ve3 committed Dec 8, 2021
1 parent d3276cd commit 6a453f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Rundiz/Image/AbstractImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ public function __set($name, $value)
*/
protected function buildSourceImageData($source_image_path)
{
if (!is_string($source_image_path)) {
$source_image_path = (string) $source_image_path;
}

$WebP = new Extensions\WebP();
$WebP->checkWebPConstant();
unset($WebP);
Expand Down
2 changes: 1 addition & 1 deletion Rundiz/Image/AbstractProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ abstract class AbstractProperties
/**
* @var string Path to source image file.
*/
protected $source_image_path;
protected $source_image_path = '';
/**
* @var int Source image width.
*/
Expand Down
2 changes: 1 addition & 1 deletion Rundiz/Image/ImageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* PHP Image manipulation class.
*
* @package Image
* @version 3.1.0
* @version 3.1.1
* @author Vee W.
* @license http://opensource.org/licenses/MIT
*/
Expand Down

0 comments on commit 6a453f9

Please sign in to comment.