Skip to content

Commit 383b208

Browse files
author
mdekrijger
committed
Dot not escaped in path eval in Sql2Generator.php
I found this broken for my node path which was something like /mypath/pages/23948327.3489 Im sure this fixes my problem. But its probably better to check for non-alpha-numeric characters using a regex. If so just escape it, i guess it cant hurt that much. But I leave that for the SQL2 gurus since this is my first real encounter with SQL2
1 parent 71e45d6 commit 383b208

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PHPCR/Util/QOM/Sql2Generator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ public function evalPath($path)
325325
$sql2 = $path;
326326
// only ensure proper quoting if the user did not quote himself, we trust him to get it right if he did.
327327
if (substr($path, 0,1) !== '[' && substr($path, -1) !== ']') {
328-
if (false !== strpos($sql2, ' ')) {
328+
if (false !== strpos($sql2, ' ') || false !== strpos($sql2, '.')) {
329329
$sql2 = '"' . $sql2 . '"';
330330
}
331331
$sql2 = '[' . $sql2 . ']';

0 commit comments

Comments
 (0)