Fix Type Error in /app/docroot/modules/contrib/drimage_improved/src/DrimageManager.php on line 429

Created on 21 August 2024, 4 months ago

Problem/Motivation

When the image fails to process or load, a type error appears:
TypeError: Symfony\Component\HttpFoundation\Response::__construct(): Argument #1 ($content) must be of type ?string, Drupal\Core\StringTranslation\TranslatableMarkup given, called in /app/docroot/modules/contrib/drimage_improved/src/DrimageManager.php on line 429 in Symfony\Component\HttpFoundation\Response->__construct() (line 224 of /app/vendor/symfony/http-foundation/Response.php).

Proposed resolution

Ensure the error message is a string by casting it to a string type.

Remaining tasks

  • ✅ File an issue
  • ➖ Addition/Change/Update/Fix
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ❌ Release

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇯🇴Jordan Qusai Taha Amman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024