Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX - Static method queryFormats should not be called dynamically #4546

Closed
wants to merge 0 commits into from
Closed

Conversation

apphp
Copy link
Contributor

@apphp apphp commented Jan 30, 2024

Static method $imagick::queryFormats() should not be called dynamically

Copy link

what-the-diff bot commented Jan 30, 2024

PR Summary

  • Modification in CCaptcha.php
    The way method queryFormats is used in the code has been updated. Previously, the method was being called directly on the 'imagick' object. Now, it is being called statically, meaning it's accessed directly from the class and not an instance of the class. This may enhance the efficiency of the code.

@apphp
Copy link
Contributor Author

apphp commented Jan 30, 2024

image

Copy link
Member

@marcovtwout marcovtwout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution.

Your PR contains some irrelevant historical commits. Could you rebase and only supply the relevant commit, and also update CHANGELOG.md?

@@ -169,7 +169,7 @@ public static function checkRequirements($extension=null)
if(extension_loaded('imagick'))
{
$imagick=new Imagick();
$imagickFormats=$imagick->queryFormats('PNG');
$imagickFormats=$imagick::queryFormats('PNG');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The $imagick=new Imagick(); is no longer nessecary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants