Skip to content

Commit

Permalink
Merge pull request #82 from oroinc/fix/issue-78_date_format_php8_2.x
Browse files Browse the repository at this point in the history
Issue #78 Error when using DATE_FORMAT with PHP 8
  • Loading branch information
x86demon authored Sep 2, 2021
2 parents b3a3154 + 471e1fe commit a56d033
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Oro/ORM/Query/AST/Functions/String/DateFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit a56d033

Please sign in to comment.