diff --git a/src/Avatar.php b/src/Avatar.php index 0a1c2d4..0d2061f 100644 --- a/src/Avatar.php +++ b/src/Avatar.php @@ -209,12 +209,12 @@ public function toSvg($customWidth=null,$customHeight) $radius = ($this->width - $this->borderSize) / 2; $center = $this->width / 2; - if(!is_null($customWidth)) - $this->width = $customWidth; - if(!is_null($customHeight)) - $this->height = $customHeight; + if(is_null($customWidth)) + $customWidth = $this->width; + if(is_null($customHeight)) + $customHeight = $this->height; - $svg = ''; + $svg = ''; if ($this->shape == 'square') { $svg .= '