diff --git a/framework/core/src/Formatter/Formatter.php b/framework/core/src/Formatter/Formatter.php index f47daae694..b93072eddf 100644 --- a/framework/core/src/Formatter/Formatter.php +++ b/framework/core/src/Formatter/Formatter.php @@ -139,7 +139,7 @@ public function unparse($xml, $context = null) $xml = $callback($context, $xml); } - return Unparser::unparse($xml); + return $xml !== null ? Unparser::unparse($xml) : null; } /**