From b2297d7f9e339ef5ab58427c0a38e5d8cc775cbb Mon Sep 17 00:00:00 2001 From: James Mullaney Date: Wed, 11 Jun 2014 14:49:47 +0100 Subject: [PATCH] Fix issue with asVersion not setting properly When looping through multiple `$directProps` values, `$result` will not be set correctly after the first pass. --- src/ContextActivities.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ContextActivities.php b/src/ContextActivities.php index 31da588..1b618a9 100644 --- a/src/ContextActivities.php +++ b/src/ContextActivities.php @@ -62,7 +62,7 @@ public function asVersion($version) { foreach (self::$directProps as $k) { $inner = $this->$k; if (isset($inner) && count($inner) > 0) { - $result = $result || array(); + $result = $result ?: array(); $result[$k] = array();