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

V3.2 #305

Closed
wants to merge 2 commits into from
Closed

V3.2 #305

wants to merge 2 commits into from

Conversation

jan-oliva
Copy link
Contributor

  • bug fix / new feature?
  • BC break? yes/no

@@ -324,7 +324,8 @@ public function escapeDateTime($value)
*/
public function escapeLike($value, $pos)
{
throw new Dibi\NotImplementedException;
$value = addcslashes(str_replace('\\', '\\\\', $value), "\x00\n\r\\'%_");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Myslím že Firebird neescapuje lomítka. Tohle je fakt ožehavá operace a nemůžeš kopírovat kód od jinud pokud si nejsi 1000% jistý, co dělá…

Copy link
Owner

@dg dg Aug 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Možná by mohlo fungovat tohle z SQLite:

		$value = addcslashes($this->escapeText($value), '%_\\');
		return ($pos <= 0 ? "'%" : "'") . $value . ($pos >= 0 ? "%'" : "'") . " ESCAPE '\\'";

Ale nemám možnost jak to ověřit, a pokud neoveříš, že to skutečně funguje jak má, tak se mi to moc nechce mergovat…

@dg
Copy link
Owner

dg commented Sep 17, 2018

Merged

@dg dg closed this Sep 17, 2018
dg pushed a commit that referenced this pull request Sep 17, 2018
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

Successfully merging this pull request may close these issues.

2 participants