| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function realEscapeString($unescapedString, Connection $linkIdentifier = null) |
||
| 15 | { |
||
| 16 | $connection = $this->manager->getOpenConnectionOrFail($linkIdentifier); |
||
| 17 | |||
| 18 | $escaped = $connection->quote($unescapedString); |
||
| 19 | // Hack! |
||
| 20 | if ($escaped[0] === "'" && $escaped[strlen($escaped) - 1] === "'") { |
||
| 21 | return substr($escaped, 1, -1); |
||
| 22 | } |
||
| 23 | |||
| 24 | throw new \Exception('Cannot escape string'); |
||
| 25 | } |
||
| 26 | } |
||
| 27 |