Imagick gives E_STRICT notice on PHP 5.4 due to queryFormats() static call
|Reported by:||DH-Shredder||Owned by:||markjaquith|
While using imagick, an E_STRICT notice is generated when queryFormats() is called statically:
If a PHP module specifies ZEND_ACC_ALLOW_STATIC, then calling that method statically creates this warning:
Strict Standards: Non-static method Imagick:queryformats() should not be called
statically in /wp-includes/class-wp-image-editor-imagick.php on line 100
Since the author is intentionally allowing static calls (and this particular check does not depend on the specific instance), it's not ideal that PHP has this behavior, since we are using the module as it is intended.
It seems like there are a couple of options:
1) We could add an @ in front of the call
2) We could temporarily create an Imagick object that we don't load anything into, and use that, then destroy it.
I don't particularly like either option, but there it is.
Initial patches attached.
Change History (8)
comment:5 markjaquith — 5 months ago
- Owner set to markjaquith
- Resolution set to fixed
- Status changed from new to closed