Skip to content

Commit 0936aa8

Browse files
committed
fixup! feat: add str_to_datetime function
1 parent ed30ad4 commit 0936aa8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Processor/Expression/FunctionEvaluator.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1542,15 +1542,15 @@ private static function sqlStrToDate(
15421542
FunctionExpression $expr,
15431543
array $row,
15441544
QueryResult $result
1545-
) {
1545+
) : string | false {
15461546
$args = $expr->args;
15471547

15481548
if (\count($args) !== 2) {
15491549
throw new ProcessorException("MySQL DATE_FORMAT() function must be called with one argument");
15501550
}
15511551

1552-
$subject = Evaluator::evaluate($conn, $scope, $args[0], $row, $result);
1553-
$format = Evaluator::evaluate($conn, $scope, $args[1], $row, $result);
1552+
$subject = (string) Evaluator::evaluate($conn, $scope, $args[0], $row, $result);
1553+
$format = (string) Evaluator::evaluate($conn, $scope, $args[1], $row, $result);
15541554

15551555
if (strpos($format, '%') === false) {
15561556
return false;

0 commit comments

Comments
 (0)