Imagick error, Fatal error: Non-static method Imagick::queryformats()

Bug #473915 reported by Patrik Grinsvall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CSS Sprite Generator
Fix Released
High
Stuart Colville

Bug Description

On line 21 of css-sprite-gen.inc.php the method Imagick::queryFormats() is called.

I get the error:
Fatal error: Non-static method Imagick::queryformats() cannot be called statically, assuming $this from incompatible context in /vaw/www/cssspritegen/includes/css-sprite-gen.inc.php on line 22.

I think it can be called statically, but on my build it can't. I has solved it by instantiate Imagick.
             try {
- $aImageFormats = Imagick::queryFormats();
+ $oImagick = new Imagick();
+ $aImageFormats = $oImagick->queryFormats();
             } catch (ImagickException $e) {
                error_log($e->getMessage());
             }

Revision history for this message
Stuart Colville (muffinresearch) wrote :

Thanks Patrik - could you provide details of the library versions you are using?

Changed in css-sprite-generator:
assignee: nobody → Ed Eliot (ejeliot)
importance: Undecided → High
status: New → Triaged
assignee: Ed Eliot (ejeliot) → Project Fondue (project-fondue)
Revision history for this message
Patrik Grinsvall (patrik-grinsvall) wrote :

Linux ubuntu 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686
Imagick 2.1.1-rc1
PHP Version 5.2.10-2ubuntu6

Revision history for this message
Stuart Colville (muffinresearch) wrote :

This will be fixed in the next release

Changed in css-sprite-generator:
status: Triaged → In Progress
Changed in css-sprite-generator:
assignee: Project Fondue (project-fondue) → Stuart Colville (muffinresearch)
milestone: none → 4.1
status: In Progress → Fix Committed
Changed in css-sprite-generator:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.