From 19e146ee4bf045ee6dd40740bf452a2152d696fd Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 10 Nov 2014 16:21:07 +0530 Subject: [PATCH] Correctly match with separator Signed-off-by: Madhura Jayaratne --- libraries/navigation/Nodes/Node.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/navigation/Nodes/Node.class.php b/libraries/navigation/Nodes/Node.class.php index bd7e07069a..32a38727cc 100644 --- a/libraries/navigation/Nodes/Node.class.php +++ b/libraries/navigation/Nodes/Node.class.php @@ -443,7 +443,11 @@ class Node if ($handle !== false) { while ($arr = $GLOBALS['dbi']->fetchArray($handle)) { foreach ($prefixes as $prefix) { - if (strpos($arr[0], $prefix) === 0) { + $starts_with = strpos( + $arr[0] . $dbSeparator, + $prefix . $dbSeparator + ) === 0; + if ($starts_with) { $retval[] = $arr[0]; break; }