Skip to content

Commit

Permalink
Merge 7056acf into 56ad893
Browse files Browse the repository at this point in the history
  • Loading branch information
RTLer committed Aug 23, 2016
2 parents 56ad893 + 7056acf commit b4703ae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Scope.php
Expand Up @@ -273,6 +273,14 @@ public function toArray()
// Pull out all of OUR metadata and any custom meta data to merge with the main level data
$meta = $serializer->meta($this->resource->getMeta());

// in case of returning NullResource we should return null and not to go with array_merge
if (is_null($data)) {
if (!empty($meta)) {
return $meta;
}
return null;
}

return array_merge($data, $meta);
}

Expand Down

0 comments on commit b4703ae

Please sign in to comment.