EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Cast string to int, if PDO improperly returned string
Yurii3ea418bbe26d
diff --git a/application/Espo/Tools/Notification/RecordService.php b/application/Espo/Tools/Notification/RecordService.phpindex 801d6edda2..06a9aea7a4 100644--- a/application/Espo/Tools/Notification/RecordService.php+++ b/application/Espo/Tools/Notification/RecordService.php@@ -299,6 +299,10 @@ class RecordService$count = $row['c'] ?? null;+ if (is_string($count) && is_numeric($count)) {+ $count = (int) $count;+ }+if (!is_int($count)) {throw new UnexpectedValueException();}