From 73beca4b3f721d93137b634793a9916ebf3d5dcf Mon Sep 17 00:00:00 2001 From: Dmitrii Fediuk Date: Wed, 5 Jun 2024 23:58:58 +0100 Subject: [PATCH] https://github.com/mage2pro/core/issues/379 --- Core/lib/text/format.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/lib/text/format.php b/Core/lib/text/format.php index 206b30f9d..f03071dab 100644 --- a/Core/lib/text/format.php +++ b/Core/lib/text/format.php @@ -85,7 +85,8 @@ function df_sprintf($s):string {/** @var string $r */ /** @var mixed[] $args */ # https://3v4l.org/3O92j # https://php.net/manual/migration71.new-features.php#migration71.new-features.symmetric-array-destructuring # https://stackoverflow.com/a/28233499 - list($s, $args) = is_array($s) ? [df_first($s), $s] : [$s, func_get_args()]; + # 2024-06-06 "Use the «Symmetric array destructuring» PHP 7.1 feature": https://github.com/mage2pro/core/issues/379 + [$s, $args] = is_array($s) ? [df_first($s), $s] : [$s, func_get_args()]; try {$r = df_sprintf_strict($args);} # 2023-08-02 "Treat `\Throwable` similar to `\Exception`": https://github.com/mage2pro/core/issues/311 catch (Th $th) {$r = $s;}