Skip to content

Commit

Permalink
Merge pull request #403 from AntonShevchuk/master
Browse files Browse the repository at this point in the history
Fixed gravatar View Helper
  • Loading branch information
Anton authored Mar 28, 2017
2 parents 92cc014 + 534b375 commit 98de1ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Validator/Traits/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected function addValidator($name, ...$validators)
/**
* Validate input data
*
* @param array|object $input
* @param array $input
* @return bool
*/
public function validate($input) : bool
Expand All @@ -82,7 +82,7 @@ public function validate($input) : bool
/**
* Assert input data
*
* @param array|object $input
* @param array $input
* @return bool
*/
public function assert($input)
Expand Down
6 changes: 2 additions & 4 deletions src/View/Helper/Gravatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
*/
return
function ($email, $size = 80, $default = 'mm', $rate = 'g') {
$url = 'https://www.gravatar.com/avatar/'
. md5(strtolower(trim($email)))
. "?s=$size&d=$default&r=$rate";
return $url;
$email = md5(strtolower(trim($email ?? "")));
return "https://www.gravatar.com/avatar/$email?s=$size&d=$default&r=$rate";
};

0 comments on commit 98de1ca

Please sign in to comment.