Skip to content

Commit

Permalink
Returning false if Guzzle\Http\EntityBody::getContentMd5() fails
Browse files Browse the repository at this point in the history
Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin
  • Loading branch information
mtdowling committed Jul 2, 2013
1 parent 41f2622 commit 41cac77
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions EntityBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,11 @@ public function getContentType()

public function getContentMd5($rawOutput = false, $base64Encode = false)
{
$hash = self::getHash($this, 'md5', $rawOutput);

return $hash && $base64Encode ? base64_encode($hash) : $hash;
if ($hash = self::getHash($this, 'md5', $rawOutput)) {
return $hash && $base64Encode ? base64_encode($hash) : $hash;
} else {
return false;
}
}

/**
Expand Down

0 comments on commit 41cac77

Please sign in to comment.