openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 04c4ca694ce815a863bb1bbfbd7d331603c4d69a
parent 5a20dc8da985332b45e734c939ad532d65869ca8
Author: Jan Dankert <devnull@localhost>
Date:   Fri,  6 Jan 2017 22:56:05 +0100

Fix: Ung├╝ltigen Zugriff auf ein Array vermeiden.

Diffstat:
model/Folder.class.php | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/model/Folder.class.php b/model/Folder.class.php @@ -612,13 +612,13 @@ class Folder extends Object // } - if ( !$with_root ) + if ( !$with_root && !empty($this->parentfolders) ) { $keys = array_keys( $this->parentfolders ); unset( $this->parentfolders[$keys[0]] ); } - if ( !$with_self ) + if ( !$with_self && !empty($this->parentfolders) ) { $keys = array_keys( $this->parentfolders ); unset( $this->parentfolders[$keys[count($keys)-1]] );