Skip to content

Commit

Permalink
Merge pull request #4 from magento-trigger/hotfix-backtrack-limit-error
Browse files Browse the repository at this point in the history
Hotfix backtrack limit error
  • Loading branch information
xmav committed Dec 10, 2021
2 parents 83f34f5 + 62cf962 commit 7b4cb1f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions library/Zend/Db/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ protected function _stripQuoted($sql)
$sql = preg_replace("/$q([^$q{$escapeChar}]*|($qe)*)*$q/s", '', $sql);
}

if ($sql === null) {
// this preg_replace call can return NULL in case of error (PREG_BACKTRACK_LIMIT_ERROR).
// In this case the result of this method will be an empty string.
return '';
}

// get a version of the SQL statement with all quoted
// values and delimited identifiers stripped out
// remove "foo\"bar"
Expand Down

0 comments on commit 7b4cb1f

Please sign in to comment.