From 7c51cf71e6706ee2c08bd3c66292330842217e9b Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Thu, 15 Feb 2018 14:52:46 +0300 Subject: [PATCH 1/2] fix Call to a member function isEmpty() on null --- src/Issue/IssueField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Issue/IssueField.php b/src/Issue/IssueField.php index 81716fdc..54f5693b 100644 --- a/src/Issue/IssueField.php +++ b/src/Issue/IssueField.php @@ -143,7 +143,7 @@ public function jsonSerialize() // if assignee property has empty value then remove it. // @see https://github.com/lesstif/php-jira-rest-client/issues/126 - if ($this->assignee->isEmpty()) { + if(empty($this->assignee) || $this->assignee->isEmpty()) { unset($vars['assignee']); } From c98dcc1c5963adfada6cdb8aac09658b063b6cff Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Thu, 15 Feb 2018 14:55:01 +0300 Subject: [PATCH 2/2] codestyle --- src/Issue/IssueField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Issue/IssueField.php b/src/Issue/IssueField.php index 54f5693b..6f505222 100644 --- a/src/Issue/IssueField.php +++ b/src/Issue/IssueField.php @@ -143,7 +143,7 @@ public function jsonSerialize() // if assignee property has empty value then remove it. // @see https://github.com/lesstif/php-jira-rest-client/issues/126 - if(empty($this->assignee) || $this->assignee->isEmpty()) { + if (empty($this->assignee) || $this->assignee->isEmpty()) { unset($vars['assignee']); }