Merge pull request #329 from sarciszewski/patch-2

Update BaseDrawing.php
This commit is contained in:
Mark Baker 2014-07-14 23:37:03 +01:00
commit 311d03b4c3
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}