fix Scrutinizer bug: get_path only allows array as parameter (calendar&infolog allow int / just the id too)

This commit is contained in:
Ralf Becker 2016-08-28 11:19:08 +02:00
parent 6903ab0f12
commit 9f073b4c4c

View File

@ -549,12 +549,12 @@ abstract class Handler
/** /**
* Create the path/name for an entry * Create the path/name for an entry
* *
* @param array $entry * @param int|string|array $entry
* @return string * @return string
*/ */
function get_path($entry) function get_path($entry)
{ {
return $entry[self::$path_attr].self::$path_extension; return (is_array($entry) ? $entry[self::$path_attr] : $entry).self::$path_extension;
} }
/** /**