This commit is contained in:
nicolaasuni 2012-05-09 21:27:32 +01:00
parent 86a2fe9ff9
commit 814ff2e01f
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,7 @@
5.9.161 (2012-05-09)
- A bug on XREF table was fixed (Bug ID: 3525051).
- Deprecated Imagick:clone was replaced.
- Method objclone() was fixed for PHP4.
5.9.160 (2012-05-03)
- A bug on tcpdf_parser.php was fixed.

View File

@ -8413,7 +8413,7 @@ class TCPDF {
$img = new Imagick();
$img->readImage($file);
// clone image object
$imga = $img->clone();
$imga = $this->objclone($img);
// extract alpha channel
$img->separateImageChannel(8); // 8 = (imagick::CHANNEL_ALPHA | imagick::CHANNEL_OPACITY | imagick::CHANNEL_MATTE);
$img->negateImage(true);
@ -26468,7 +26468,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
* @since 4.5.029 (2009-03-19)
*/
public function objclone($object) {
return @clone($object);
// clone is defined only in PHP 5
return (version_compare(phpversion(), '5.0') < 0) ? $object : clone($object);
}
/**