From 9b6aa34dfbed6b364bc7ef4817331fafdc1d4876 Mon Sep 17 00:00:00 2001 From: hlogeon Date: Wed, 26 Nov 2014 08:07:44 +0400 Subject: [PATCH] Check array keys in DecisionHint.php --- src/Aws/Swf/Fluent/DecisionHint.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Aws/Swf/Fluent/DecisionHint.php b/src/Aws/Swf/Fluent/DecisionHint.php index c260a45..fe7fafc 100644 --- a/src/Aws/Swf/Fluent/DecisionHint.php +++ b/src/Aws/Swf/Fluent/DecisionHint.php @@ -90,13 +90,13 @@ public function getLastEventResult() { if ($event) { switch ($event['eventType']) { case \Aws\Swf\Enum\EventType::CHILD_WORKFLOW_EXECUTION_COMPLETED: - $result = $event['childWorkflowExecutionCompletedEventAttributes']['result']; + $result = array_key_exists('result', $event['childWorkflowExecutionCompletedEventAttributes']) ? $event['childWorkflowExecutionCompletedEventAttributes']['result'] : null; break; case \Aws\Swf\Enum\EventType::ACTIVITY_TASK_COMPLETED: - $result = $event['activityTaskCompletedEventAttributes']['result']; + $result = array_key_exists('result', $event['activityTaskCompletedEventAttributes']) ? $event['activityTaskCompletedEventAttributes']['result'] : null; break; case \Aws\Swf\Enum\EventType::WORKFLOW_EXECUTION_STARTED: - $result = $event['workflowExecutionStartedEventAttributes']['input']; + $result = array_key_exists('input', $event['workflowExecutionStartedEventAttributes']) ? $event['workflowExecutionStartedEventAttributes']['input'] : null; break; } }