From 9f073b4c4c3c67c52467197a90979c5147ff02e0 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 28 Aug 2016 11:19:08 +0200 Subject: [PATCH] fix Scrutinizer bug: get_path only allows array as parameter (calendar&infolog allow int / just the id too) --- api/src/CalDAV/Handler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/CalDAV/Handler.php b/api/src/CalDAV/Handler.php index 008e7f198f..a6d602282b 100644 --- a/api/src/CalDAV/Handler.php +++ b/api/src/CalDAV/Handler.php @@ -549,12 +549,12 @@ abstract class Handler /** * Create the path/name for an entry * - * @param array $entry + * @param int|string|array $entry * @return string */ function get_path($entry) { - return $entry[self::$path_attr].self::$path_extension; + return (is_array($entry) ? $entry[self::$path_attr] : $entry).self::$path_extension; } /**