- if ($attrs != '') {
- $tmp = $this->_parseAttributes($attrs);
- if (isset($tmp['width'])) {
- $this->_attrs['width'] = $tmp['width'];
+ if (is_string($attrs)) {
+ $attrs = $this->_parseAttributes($attrs);
+ }
+ if (is_array($attrs)) {
+ if (isset($attrs['width'])) {
+ $this->_attrs['width'] = $attrs['width'];