php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64945 ZEND_ACC_ALLOW_STATIC vs ZEND_ACC_STATIC
Submitted: 2013-05-29 22:09 UTC Modified: 2013-09-25 07:34 UTC
Votes:3
Avg. Score:4.3 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: info at markoheijnen dot com Assigned: mkoppanen
Status: Closed Package: imagick (PECL)
PHP Version: 5.4.15 OS: irrelevant
Private report: No CVE-ID:
 [2013-05-29 22:09 UTC] info at markoheijnen dot com
Description:
------------
Static methods like Imagick::queryFormats shouldn't use ZEND_ACC_ALLOW_STATIC but 
most likely use ZEND_ACC_STATIC.

This currently happens in the WordPress code base. The Imagick code can be found 
here: http://core.trac.wordpress.org/browser/trunk/wp-includes/class-wp-image-
editor-imagick.php

Test script:
---------------
Imagick::queryFormats( 'JPG' );

Expected result:
----------------
no errors showing when using error_reporting(E_ALL);

Actual result:
--------------
Returns 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.php

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-25 07:34 UTC] mkoppanen@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: mkoppanen
 [2013-09-25 07:34 UTC] mkoppanen@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 17 18:02:13 2014 UTC