From 7ef73cc75ad3d6ba7cb77ab19cdb3cf682e60305 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sat, 5 Oct 2024 10:04:22 +0300 Subject: [PATCH] BaseEntity: object to string case prevent error --- application/Espo/ORM/BaseEntity.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/Espo/ORM/BaseEntity.php b/application/Espo/ORM/BaseEntity.php index 5df79c2139..8da781bb0c 100644 --- a/application/Espo/ORM/BaseEntity.php +++ b/application/Espo/ORM/BaseEntity.php @@ -501,6 +501,12 @@ class BaseEntity implements Entity switch ($attributeType) { case self::VARCHAR: case self::TEXT: + if (is_object($value)) { + // Prevents an error. + // @todo Remove in v10.0. + return 'Object'; + } + return strval($value); case self::BOOL: