TypeError: Drupal\twig_tools\TwigExtension\TwigConvert::base64Encode(): Argument #1 ($value) must be of type string

Created on 12 April 2024, 7 months ago

Problem/Motivation

After update twig_tools 8.x-1.4 to twig_tools 2.0.0.

TypeError: Drupal\twig_tools\TwigExtension\TwigConvert::base64Encode(): Argument #1 ($value) must be of type string, null given, called in /var/www/html/vendor/twig/twig/src/Environment.php(418) : eval()'d code on line 242 in Drupal\twig_tools\TwigExtension\TwigConvert::base64Encode() (line 167 of modules/contrib/twig_tools/src/TwigExtension/TwigConvert.php).

Steps to reproduce

In template twig call base64_encode filter with empty value.

In version 2.x we introduce type of variable in mรฉthode.

Proposed resolution

Add nullable possibility for base64Encode.

๐Ÿ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

๐Ÿ‡ซ๐Ÿ‡ทFrance hesslinger

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