Skip to content

V3.2 - #305

Closed
jan-oliva wants to merge 2 commits into
dg:v3.2from
jan-oliva:v3.2
Closed

V3.2#305
jan-oliva wants to merge 2 commits into
dg:v3.2from
jan-oliva:v3.2

Conversation

@jan-oliva

Copy link
Copy Markdown
Contributor
  • bug fix / new feature?
  • BC break? yes/no

public function escapeLike($value, $pos)
{
throw new Dibi\NotImplementedException;
$value = addcslashes(str_replace('\\', '\\\\', $value), "\x00\n\r\\'%_");

Copy link
Copy Markdown
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á…

@dg dg Aug 22, 2018

Copy link
Copy Markdown
Owner

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

dg commented Sep 17, 2018

Copy link
Copy Markdown
Owner

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