Skip to content

Commit

Permalink
Make fallback 'mm' backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Creativeorange authored Jul 14, 2020
1 parent 1513093 commit 6ca1b80
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Gravatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ class Gravatar
*/
public function fallback($fallback)
{
// Gravatar changed mm to mp.
// This way we make sure everything keeps working
if ($fallback === 'mm')
$fallback = 'mp';

if (
filter_var($fallback, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED)
|| in_array($fallback, array('mp', 'identicon', 'monsterid', 'wavatar', 'retro', 'robohash', 'blank'))
Expand Down

0 comments on commit 6ca1b80

Please sign in to comment.