diff --git a/src/Oro/ORM/Query/AST/Functions/String/DateFormat.php b/src/Oro/ORM/Query/AST/Functions/String/DateFormat.php index f69f4375150..596bf2492c6 100644 --- a/src/Oro/ORM/Query/AST/Functions/String/DateFormat.php +++ b/src/Oro/ORM/Query/AST/Functions/String/DateFormat.php @@ -93,7 +93,7 @@ public function parse(Parser $parser) private function validateFormat(Parser $parser): void { - $format = \str_replace('%%', '', $this->parameters[self::FORMAT_KEY]); + $format = \str_replace('%%', '', (string)$this->parameters[self::FORMAT_KEY]); $unsupportedFormats = \array_diff(self::$knownFormats, self::$supportedFormats); foreach ($unsupportedFormats as $unsupportedFormat) { if (false !== \strpos($format, $unsupportedFormat)) {