Archives de la liste dev@paheko.cloud
Bug: Deprecated: ctype_digit(): Argument of type bool will be interpreted as string in the future
mail at matthieubessat.fr via dev
22/12/2023 15:53:20
--c01bc72483578c3a6f52d17e525640418f15c2cd2a752a8d1c6ce6f8b6ca
Mime-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
Bonjour, signalement d'un warning.
URL: /api/accounting/years
Traceback:
```
/!\ PHP error
Deprecated: ctype_digit(): Argument of type bool will be interpreted as str=
ing in the future
#0 .../include/lib/Paheko/API.php(442)
#1 .../include/lib/Paheko/API.php(442): ctype_digit(bool(false))
#2 .../include/lib/Paheko/API.php(672): Paheko\API->accounting(string(5) "y=
ears")
#3 .../include/lib/Paheko/API.php(718)
#4 .../include/lib/Paheko/Web/Router.php(119): Paheko\API::routeHttpRequest=
(string(16) "account=E2=80=A6)
#5 .../www/_route.php(59)
```
Env:
- Paheko 1.3.4 [release]
- Version PHP : 8.1.22
- Version SQLite : 3.40.1
La ligne incrimin=C3=A9 :
```php
if (($p1 =3D=3D=3D 'current' || ctype_digit($p1)) && ($p2 =3D=3D=3D
'jou=
rnal' || $p2 =3D=3D=3D 'account/journal')) {
```
Le probl=C3=A8me vient de la fonction `strtok` qui peut retourner un false =
si
il n'y a plus rien =C3=A0 d=C3=A9couper.
C'est un bug parmis d'autre que j'ai vu en utilisant php 8.3 en mode
strict.
Je vais essayer de proposer un patch.
Cordialement,
--=20
Matthieu Bessat <mail@matthieubessat.fr>
Website: https://matthieubessat.fr
GPG Fingerprint: F3E0395DC15CD92D
--c01bc72483578c3a6f52d17e525640418f15c2cd2a752a8d1c6ce6f8b6ca
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iHUEABYIAB0WIQQRYe1okINIY4xZaHEIxGwvFBSsgQUCZYWizgAKCRAIxGwvFBSs
gXDvAP9FuS10Pcn69dCXj7AklS4+SHbo9E34e0gBzb1f7J7urQD/UzGTbnQBzeGk
oka5u8jN1ciz/hEsa1tG+nvg578nqgs=
=CogT
-----END PGP SIGNATURE-----
--c01bc72483578c3a6f52d17e525640418f15c2cd2a752a8d1c6ce6f8b6ca--
Bug: Deprecated: ctype_digit(): Argument of type bool will be interpreted as string in the future
BohwaZ
22/12/2023 15:57:27
Merci Matthieu c'est corrigé dans le code :
https://fossil.kd2.org/paheko/info/c4611ce7755724e7
Je prépare un 1.3.5 aujourd'hui :)
Bug: Deprecated: ctype_digit(): Argument of type bool will be interpreted as string in the future
mail at matthieubessat.fr via dev
22/12/2023 16:00:29
Quelle reactivité ! Incroyable x)
On Fri Dec 22, 2023 at 3:57 PM CET, BohwaZ wrote:> Merci Matthieu c'est corrigé dans le code :> https://fossil.kd2.org/paheko/info/c4611ce7755724e7>> Je prépare un 1.3.5 aujourd'hui :)