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

Duplicate quoting SQL params on AcrtiveRecord::deleteAll() method #16276

Open
mubat opened this issue May 14, 2018 · 1 comment
Open

Duplicate quoting SQL params on AcrtiveRecord::deleteAll() method #16276

mubat opened this issue May 14, 2018 · 1 comment
Labels
status:to be verified Needs to be reproduced and validated. type:bug Bug

Comments

@mubat
Copy link

mubat commented May 14, 2018

I've got issue when try to execute Image::deleteAll(['like', 'cover', 'some_image']);. Yii2 twice quote param ''some_image' before execute query.
In result query looks like

DELETE FROM image WHERE cover LIKE '%some\\_image%'

but should be

DELETE FROM image WHERE cover LIKE '%some\_image%'

(with one back slash)

Additional info

Q A
Yii version 2.0.12
PHP version PHP 7.1.17-1+ubuntu16.04.1+deb.sury.org+1
Operating system Linux Mint 18.3 64-bit
@samdark samdark changed the title Duplicate quoating SQL params on AcrtiveRecord::deleteAll() method Duplicate quoting SQL params on AcrtiveRecord::deleteAll() method May 14, 2018
@samdark samdark added type:bug Bug status:to be verified Needs to be reproduced and validated. labels May 14, 2018
@samdark
Copy link
Member

samdark commented May 14, 2018

I think one slash could be quoting slash in a PHP string.

@samdark samdark added this to the 2.0.17 milestone May 14, 2018
@samdark samdark removed this from the 2.0.17 milestone Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:to be verified Needs to be reproduced and validated. type:bug Bug
Projects
None yet
Development

No branches or pull requests

2 participants