Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A boolean false breaks querybuilder update #11487

Closed
that-guy-iain opened this issue Jun 3, 2024 · 1 comment
Closed

A boolean false breaks querybuilder update #11487

that-guy-iain opened this issue Jun 3, 2024 · 1 comment

Comments

@that-guy-iain
Copy link

that-guy-iain commented Jun 3, 2024

Bug Report

Q A
BC Break no
Version 2.19.5

Summary

When you use false boolean value in the set of the querybuilder it doesn't work as expected.

$queryBuilder = $this->entityRepository->createQueryBuilder('t');
$queryBuilder->update(TaxType::class, 't')->set('t.default', false);
$queryBuilder->getQuery()->execute();

Current behavior

It causes the following error message

Warning: Attempt to read property "type" on null in vendor/doctrine/orm/src/Query/Parser.php line 2928

but it works if you put in 'false'

How to reproduce

Create an entity with a boolean value and then try to set it using the query builder with a boolean false.

Expected behavior

For it to know that false is a boolean value and value for the boolean value or to return an Syntax error instead of trying to access full.

@greg0ire
Copy link
Member

greg0ire commented Jun 3, 2024

Fixed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants