mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-22 13:26:07 +03:00
Update BaseDrawing.php
Avoid division by zero
This commit is contained in:
parent
9d66087272
commit
be24d5d30f
@ -349,7 +349,7 @@ class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable
|
||||
public function setHeight($pValue = 0) {
|
||||
// Resize proportional?
|
||||
if ($this->_resizeProportional && $pValue != 0) {
|
||||
$ratio = $this->_width / $this->_height;
|
||||
$ratio = $this->_width / ($this->_height !== 0 ? $this->_height : 1);
|
||||
$this->_width = round($ratio * $pValue);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user