Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix runtime notice thrown with PECL imagick>=3.1.0b1 #99

Merged
merged 2 commits into from

5 participants

@avalanche123
Owner

This change doesn't seem to be backwards compatible, I suggest adding a check for method existence and resorting to clone operator otherwise

@lenar

Can't check for the method since it's still there, it just throws some annoying DEPRECATED notices.

@lenar

Possibly could check with Reflection API if that's acceptable to you.

@avalanche123

we could explicitly check for Imagick version number then, let me know if you need help with this

@chetzof

Any progress? On updating pecl packages the script that uses Imagine just crashes with the above mentioned error.

@benjamindulau

+1 for merging that PR ;-)

@juliendidier

+1 for merging

@avalanche123 avalanche123 merged commit cc4dd94 into avalanche123:develop
@avalanche123

Merged,thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 5, 2012
  1. @lenar
Commits on May 3, 2012
  1. @lenar
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Imagine/Imagick/Image.php
View
6 lib/Imagine/Imagick/Image.php
@@ -60,7 +60,11 @@ public function __destruct()
public function copy()
{
try {
- $clone = $this->imagick->clone();
+ if (version_compare(phpversion("imagick"), "3.1.0b1", ">=")) {
+ $clone = clone $this->imagick;
+ } else {
+ $clone = $this->imagick->clone();
+ }
} catch (\ImagickException $e) {
throw new RuntimeException(
'Copy operation failed', $e->getCode(), $e
Something went wrong with that request. Please try again.