Skip to content

Commit

Permalink
fix canCreate on ItilOject when empty object called
Browse files Browse the repository at this point in the history
  • Loading branch information
orthagh authored and trasher committed Feb 6, 2019
1 parent 9031898 commit 3b5309e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inc/itilfollowup.class.php
Expand Up @@ -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
Expand Down

0 comments on commit 3b5309e

Please sign in to comment.