diff --git a/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php b/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php index 6c904fa5e8e..ed5a62e9f36 100644 --- a/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php +++ b/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php @@ -6,6 +6,7 @@ namespace Rector\Php81\Rector\FuncCall; use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr; +use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\Cast\String_ as CastString_; use PhpParser\Node\Expr\ConstFetch; use PhpParser\Node\Expr\FuncCall; @@ -185,6 +186,9 @@ CODE_SAMPLE if ($this->shouldSkipTrait($argValue, $type, $isTrait)) { return null; } + if ($type instanceof MixedType && $args[$position]->value instanceof ArrayDimFetch) { + return null; + } $args[$position]->value = new CastString_($argValue); $funcCall->args = $args; return $funcCall; diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index af24b9745f0..529082d84d3 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '18f482fad0993dbf0b55c628557297610256d87d'; + public const PACKAGE_VERSION = '7574abd469cbfe569dd47dd9ae9e6aa668a0cf1b'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-04-17 09:13:11'; + public const RELEASE_DATE = '2024-04-17 16:27:51'; /** * @var int */