From f198d7d8b726132851413a6a9b4918e02c077a4b Mon Sep 17 00:00:00 2001 From: chrico Date: Fri, 16 Dec 2022 14:23:02 +0100 Subject: [PATCH] ScriptHandler // allow $path to be null for wp_set_script_translations(). --- src/Handler/ScriptHandler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Handler/ScriptHandler.php b/src/Handler/ScriptHandler.php index 7d8c379..056ee76 100644 --- a/src/Handler/ScriptHandler.php +++ b/src/Handler/ScriptHandler.php @@ -96,6 +96,10 @@ public function register(Asset $asset): bool $translation = $asset->translation(); if ($translation['domain'] !== '') { + /** + * The $path is allowed to be "null"- or a "string"-value. + * @psalm-suppress PossiblyNullArgument + */ wp_set_script_translations($handle, $translation['domain'], $translation['path']); }