From 498b7f4b43b25dc5ee0e890f8650b03235c7d1ab Mon Sep 17 00:00:00 2001 From: Liam Morland Date: Tue, 28 Sep 2021 16:03:39 -0400 Subject: [PATCH] RT#988316/ISTWCMS-3213: Properly detect success of uw_wcms_tools_jira_api_query() This has always returned an object. Previously, this was iterated on directly. In c40145d, the return was set to a variable which was checked before iterating in case it was NULL. But the check was for an array. --- uw_wcms_tools.jira.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uw_wcms_tools.jira.inc b/uw_wcms_tools.jira.inc index 0d34da4..c0cab10 100644 --- a/uw_wcms_tools.jira.inc +++ b/uw_wcms_tools.jira.inc @@ -85,7 +85,7 @@ function uw_wcms_tools_jira_api_query($path, stdClass $data = NULL, $method = 'P */ function uw_wcms_tools_jira_api_ticket_create(stdClass $jira_ticket) { $result = uw_wcms_tools_jira_api_query('issue', $jira_ticket); - if (is_array($result)) { + if (is_object($result)) { foreach ($result as $key => $value) { $jira_ticket->$key = $value; } -- GitLab