Skip to content

Commit 06b1eb3

Browse files
committed
fixed deprecated warning for PHP 7.4
1 parent 1cd38ee commit 06b1eb3

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ php:
99
- 7.4
1010

1111
before_script:
12-
- composer install --dev
12+
- composer install
1313

1414
script: ./vendor/bin/phpunit --configuration phpunit.xml.dist

library/Md5Crypt/Md5Crypt.php

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
Many thanks to
1919
2020
- Fabian Steiner <[email protected]>
21-
- Jörg Reinholz <http://www.fastix.de/>
21+
- J�rg Reinholz <http://www.fastix.de/>
2222
2323
USAGE
2424
@@ -55,9 +55,10 @@ static protected function to64($v, $n)
5555
$ret = '';
5656

5757
while(--$n >= 0) {
58-
$ret .= $itoa64{$v & 0x3f};
58+
$ret .= $itoa64[$v & 0x3f];
5959
$v = $v >> 6;
6060
}
61+
6162
return $ret;
6263
}
6364

@@ -132,22 +133,22 @@ static public function unix($pw, $salt = NULL, $Magic = '$1$')
132133

133134
// Final xform
134135
$passwd = '';
135-
$passwd .= self::to64((intval(ord($final{0})) << 16)
136-
|(intval(ord($final{6})) << 8)
137-
|(intval(ord($final{12}))),4);
138-
$passwd .= self::to64((intval(ord($final{1})) << 16)
139-
|(intval(ord($final{7})) << 8)
140-
|(intval(ord($final{13}))), 4);
141-
$passwd .= self::to64((intval(ord($final{2})) << 16)
142-
|(intval(ord($final{8})) << 8)
143-
|(intval(ord($final{14}))), 4);
144-
$passwd .= self::to64((intval(ord($final{3})) << 16)
145-
|(intval(ord($final{9})) << 8)
146-
|(intval(ord($final{15}))), 4);
147-
$passwd .= self::to64((intval(ord($final{4}) << 16)
148-
|(intval(ord($final{10})) << 8)
149-
|(intval(ord($final{5})))), 4);
150-
$passwd .= self::to64((intval(ord($final{11}))), 2);
136+
$passwd .= self::to64((intval(ord($final[0])) << 16)
137+
|(intval(ord($final[6])) << 8)
138+
|(intval(ord($final[12]))),4);
139+
$passwd .= self::to64((intval(ord($final[1])) << 16)
140+
|(intval(ord($final[7])) << 8)
141+
|(intval(ord($final[13]))), 4);
142+
$passwd .= self::to64((intval(ord($final[2])) << 16)
143+
|(intval(ord($final[8])) << 8)
144+
|(intval(ord($final[14]))), 4);
145+
$passwd .= self::to64((intval(ord($final[3])) << 16)
146+
|(intval(ord($final[9])) << 8)
147+
|(intval(ord($final[15]))), 4);
148+
$passwd .= self::to64((intval(ord($final[4]) << 16)
149+
|(intval(ord($final[10])) << 8)
150+
|(intval(ord($final[5])))), 4);
151+
$passwd .= self::to64((intval(ord($final[11]))), 2);
151152

152153
// Return the final string
153154
return $Magic . $salt . '$' . $passwd;

0 commit comments

Comments
 (0)