Skip to content

Commit

Permalink
Merge pull request #81 from oroinc/fix/issue-78_date_format_php8_1.3
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 3dd5135 + 860879c commit 529d239
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 @@ -102,7 +102,7 @@ public function parse(Parser $parser)
*/
private function validateFormat(Parser $parser)
{
$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 (strpos($format, $unsupportedFormat) !== false) {
Expand Down

0 comments on commit 529d239

Please sign in to comment.