Skip to content

Commit

Permalink
RELEASE 1.1.3 - improved PHP 8.1 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivantcholakov committed Aug 26, 2022
1 parent 24db27d commit 9db68e4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 - 2020 Ivan Tcholakov <[email protected]>
Copyright (c) 2015 - 2022 Ivan Tcholakov <[email protected]>
Copyright (c) 2011 - 2015 Ryan Marshall <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ http://iridadesign.com/starter-public-edition-4/www/playground/gravatar-test
License Information
-------------------

Copyright (c) 2015 - 2020 Ivan Tcholakov, [email protected]
Copyright (c) 2015 - 2022 Ivan Tcholakov, [email protected]
Copyright (c) 2011 - 2015 Ryan Marshall, http://irealms.co.uk
License: The MIT License (MIT), http://opensource.org/licenses/MIT
10 changes: 5 additions & 5 deletions libraries/Gravatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
/**
* Gravatar Library for CodeIgniter
*
* @author Ivan Tcholakov <[email protected]>, 2015 - 2020
* @author Ivan Tcholakov <[email protected]>, 2015 - 2022
* @author Ryan Marshall <[email protected]>, 2011 - 2015, @link http://irealms.co.uk
*
* Code repository: @link https://github.com/ivantcholakov/Codeigniter-Gravatar
*
* @version 1.1.2
* @version 1.1.3
*
* @license The MIT License (MIT)
* @link http://opensource.org/licenses/MIT
Expand Down Expand Up @@ -241,7 +241,7 @@ public function execute_profile_request($email, $format = null) {
}
}

$format = trim($format);
$format = trim((string) $format);

if ($format != '') {
$format = '.'.ltrim($format, '.');
Expand Down Expand Up @@ -332,7 +332,7 @@ public function last_error() {
*/
public function create_hash($email) {

return md5(strtolower(trim($email)));
return md5(strtolower(trim((string) $email)));
}

protected function is_https() {
Expand Down Expand Up @@ -369,7 +369,7 @@ protected function is_https() {
*/
public function set_email($email)
{
$email = trim(strtolower($email));
$email = trim(strtolower((string) $email));

if ( ! filter_var($email, FILTER_VALIDATE_EMAIL) === FALSE)
{
Expand Down

0 comments on commit 9db68e4

Please sign in to comment.