Skip to content

Commit

Permalink
Avoid return by reference errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Dec 21, 2014
1 parent 55d6abb commit 15d5a8f
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -109,11 +109,14 @@ public function &__get($property)
{
switch ($property) {
case 'plain':
return $this->plainBody();
$body = $this->plainBody();
return $body;
case 'html':
return $this->htmlBody();
$body = $this->htmlBody();
return $body;
case 'bodyPart':
return $this->bodyPartBody();
$body = $this->bodyPartBody();
return $body;
default:
throw new InvalidArgumentException("Unknown property: $property");
}
Expand Down

0 comments on commit 15d5a8f

Please sign in to comment.