From 944b4c7a1e8edc52eb9b167ee8b0d9ba480c98b0 Mon Sep 17 00:00:00 2001 From: Jim Safley Date: Tue, 29 Apr 2025 21:24:24 -0400 Subject: [PATCH] Cast __toString() return value to string Prevents fatal uncaught type error "Return value must be of type string" when casting ValueRepresentation to string. --- application/src/Api/Representation/ValueRepresentation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/Api/Representation/ValueRepresentation.php b/application/src/Api/Representation/ValueRepresentation.php index f6d7ef686c..55071eb73a 100644 --- a/application/src/Api/Representation/ValueRepresentation.php +++ b/application/src/Api/Representation/ValueRepresentation.php @@ -43,7 +43,7 @@ public function __toString() 'string' => $this->dataType->toString($this), ]); $eventManager->trigger('rep.value.string', $this, $args); - return $args['string']; + return (string) $args['string']; } /**