From 4871414204799044c31aa2764c4b4ca020e2331d Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Fri, 26 Nov 2010 16:54:51 +0100 Subject: Fix for $conf['breadcrumbs'] < 0, FS#2107 This fixes an infinite loop in breadcrumbs() and makes the behaviors in all places where breadcrumbs are used consistent so that non-numeric values, values < 0 and 0 are treated the same way. --- inc/common.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'inc/common.php') diff --git a/inc/common.php b/inc/common.php index 18f782788..667846804 100644 --- a/inc/common.php +++ b/inc/common.php @@ -268,6 +268,9 @@ function breadcrumbs(){ global $ACT; global $conf; + // Prevent infinite loop later in this function + if (!is_numeric($conf['breadcrumbs']) || $conf['breadcrumbs'] <= 0) return array(); + //first visit? $crumbs = isset($_SESSION[DOKU_COOKIE]['bc']) ? $_SESSION[DOKU_COOKIE]['bc'] : array(); //we only save on show and existing wiki documents -- cgit v1.2.3