1
Vote

setHeight and setWidth in BaseDrawing exception

description

$ratio = $this->_height / $this->_width; throws an exception if $this->_width is not initialized. (line 156 and 178 ish of Shape/BaseDrawing.php

fix:
            $ratio = 1.0;
        if ($this->_width) {
            $ratio = $this->_height / $this->_width;
        }
and
           $ratio = 1.0;
        if ($this->_height) {
            $ratio = $this->_width / $this->_height;    
        }

comments