From 53bb65495e51c4f57826968b82918637813aecaf Mon Sep 17 00:00:00 2001 From: icewing Date: Mon, 2 Jun 2008 13:55:10 +0000 Subject: Marcus Povey * Minor bugfix git-svn-id: https://code.elgg.org/elgg/trunk@769 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index fc7627888..a185d8c4e 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1067,18 +1067,21 @@ if ($include_subdirs) { if (strpos($call['file'], $path) === 0) { + if ($strict_mode) { - if ($callstack[1] === $call) return true; + if ($callstack[1] === $call) { return true; } } else + { return true; + } } } else { if (strcmp($path, $call['file'])==0) if ($strict_mode) { - if ($callstack[2] === $call) return true; + if ($callstack[1] === $call) return true; } else return true; } @@ -1087,7 +1090,7 @@ } if ($CONFIG->debug) - system_message("Gatekeeper'd function called from {$callstack[2]['file']}:{$callstack[2]['line']}\n\nStack trace:\n\n" . print_r($callstack, true)); + system_message("Gatekeeper'd function called from {$callstack[1]['file']}:{$callstack[1]['line']}\n\nStack trace:\n\n" . print_r($callstack, true)); return false; } -- cgit v1.2.3