1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Modernize to PHP 8.1

This commit is contained in:
Yassine Guedidi 2025-04-05 14:01:48 +02:00
parent ca018c77e3
commit 9e2720cddc
26 changed files with 48 additions and 52 deletions

View file

@ -1074,7 +1074,7 @@ class ContentProxyTest extends TestCase
private function strToHex($string)
{
$hex = '';
for ($i = 0; $i < \strlen($string); ++$i) {
for ($i = 0; $i < \strlen((string) $string); ++$i) {
$ord = \ord($string[$i]);
$hexCode = dechex($ord);
$hex .= substr('0' . $hexCode, -2);
@ -1093,7 +1093,7 @@ class ContentProxyTest extends TestCase
private function hexToStr($hex)
{
$string = '';
for ($i = 0; $i < \strlen($hex) - 1; $i += 2) {
for ($i = 0; $i < \strlen((string) $hex) - 1; $i += 2) {
$string .= \chr(hexdec($hex[$i] . $hex[$i + 1]));
}