mpdf-examples icon indicating copy to clipboard operation
mpdf-examples copied to clipboard

Images load issue

Open fayzasalman opened this issue 1 year ago • 0 comments

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.

fayzasalman avatar Oct 30 '24 07:10 fayzasalman