Merge pull request #19277 from SachinBahukhandi/twig-update-fix

Fixed the issue appearing on updating twig
This commit is contained in:
Maurício Meneghini Fauth 2024-08-30 20:19:32 -03:00 committed by GitHub
commit d4eaa170f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -396,7 +396,7 @@ class Error extends Message
'_realConnect',
];
if (in_array($function, $includeFunctions, true)) {
if (in_array($function, $includeFunctions, true) && is_string($arg)) {
$retval .= self::relPath($arg);
} elseif (in_array($function, $connectFunctions, true) && is_string($arg)) {
$retval .= gettype($arg) . ' ********';

View File

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace PhpMyAdmin\Twig\Node\Expression;
use Twig\Attribute\FirstClassTwigCallableReady;
use Twig\Compiler;
use Twig\Error\SyntaxError;
use Twig\Node\Expression\AbstractExpression;
@ -18,6 +19,7 @@ use function trim;
final class TransExpression extends AbstractExpression
{
#[FirstClassTwigCallableReady]
public function __construct(string $name, Node $arguments, int $lineno)
{
parent::__construct(['arguments' => $arguments], ['name' => $name, 'is_defined_test' => false], $lineno);