From 3b5309ea18b01385f354354259a61bc8eec34a21 Mon Sep 17 00:00:00 2001 From: Alexandre Delaunay Date: Wed, 6 Feb 2019 09:46:38 +0100 Subject: [PATCH] fix canCreate on ItilOject when empty object called --- inc/itilfollowup.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/itilfollowup.class.php b/inc/itilfollowup.class.php index 04ab383f581..503826cd73c 100644 --- a/inc/itilfollowup.class.php +++ b/inc/itilfollowup.class.php @@ -129,6 +129,11 @@ function canViewItem() { function canCreateItem() { + if (!isset($this->fields['itemtype']) + || strlen($this->fields['itemtype']) == 0) { + return false; + } + $itilobject = new $this->fields['itemtype']; if (!$itilobject->can($this->getField('items_id'), READ) // No validation for closed tickets