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

Images load issue #26

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

fayzasalman
Copy link

I encountered an error in the example04_images.php file due to the logger code implementation. The issue arose from a method signature mismatch with the Psr\Log\AbstractLogger. I have fixed the code by aligning the method signature with the expected parameters.

Changes Made:

  • Corrected the logger implementation to match the Psr\Log\AbstractLogger interface.
  • Ensured compatibility with PHP 8.2.12 by updating the method signature.

Fixed Code:

php
class CustomLogger extends \Psr\Log\AbstractLogger implements \Psr\Log\LoggerInterface
{
    public function log($level, $message, array $context = []): void
    {
        echo $level . ': ' . $message . "\n";
    }
}

Steps to Verify:

  • Run the example04_images.php file and ensure there are no errors.
  • Confirm the logger output displays the correct log messages.

I have pushed the updated code to the repository. Please review it.

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.

1 participant