diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-12-08 12:21:40 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-12-08 12:21:40 +0400 |
commit | 6f945465fe40021d579bc2b4b8876468da69b062 (patch) | |
tree | 51aeaa543bc51c7188970711a28223540a9beb1a /libs | |
parent | 57943d81994d991e4ee08ecdc9eeeebe56f1cd7b (diff) |
trying to fix Illegal string offset 'masked' in <strong>/var/www/http/piwik/libs/tcpdf/tcpdf.php</strong> on line <strong>7067</strong> reporting in forums
Diffstat (limited to 'libs')
-rw-r--r-- | libs/tcpdf/tcpdf.php | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/libs/tcpdf/tcpdf.php b/libs/tcpdf/tcpdf.php index 7c95d5a3b9..1999010026 100644 --- a/libs/tcpdf/tcpdf.php +++ b/libs/tcpdf/tcpdf.php @@ -7059,20 +7059,22 @@ class TCPDF { return; } TCPDF_STATIC::set_mqr($mqr); - if ($ismask) { - // force grayscale - $info['cs'] = 'DeviceGray'; - } - if ($imgmask !== false) { - $info['masked'] = $imgmask; - } - if (!empty($exurl)) { - $info['exurl'] = $exurl; - } - // array of alternative images - $info['altimgs'] = $altimgs; - // add image to document - $info['i'] = $this->setImageBuffer($file, $info); + if(is_array($info)) { + if ($ismask) { + // force grayscale + $info['cs'] = 'DeviceGray'; + } + if ($imgmask !== false) { + $info['masked'] = $imgmask; + } + if (!empty($exurl)) { + $info['exurl'] = $exurl; + } + // array of alternative images + $info['altimgs'] = $altimgs; + // add image to document + $info['i'] = $this->setImageBuffer($file, $info); + } } // set alignment $this->img_rb_y = $y + $h; |