Skip to content

Commit

Permalink
fix: Fixed an issue with properties not being initialized before bein…
Browse files Browse the repository at this point in the history
…g accessed, which would cause image uploads to fail ([#323](#323))
  • Loading branch information
Andrew Welch committed Apr 8, 2022
1 parent 1c060ca commit a722a79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/models/OptimizedImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class OptimizedImage extends Model
/**
* @var array An array of the x,y image focal point coords, ranging from 0.0 to 1.0
*/
public array $focalPoint;
public array $focalPoint = [];

/**
* @var int The width of the original source image
Expand Down Expand Up @@ -83,17 +83,17 @@ class OptimizedImage extends Model
/**
* @var int The overall lightness of the image, from 0..100
*/
public int $lightness;
public int $lightness = 0;

/**
* @var int The width of the placeholder image
*/
public int $placeholderWidth;
public int $placeholderWidth = 0;

/**
* @var int The height of the placeholder image
*/
public int $placeholderHeight;
public int $placeholderHeight = 0;

/**
* @var array An array of errors logged when generating the image transforms
Expand Down

0 comments on commit a722a79

Please sign in to comment.