Ed2k Autolinker

Started by Diego Andrés, December 21, 2023, 08:23:04 PM

Previous topic - Next topic

Diego Andrés

Link to the mod




Ed2k Autolinker
Developed by Diego Andrés



Introduction
It will convert ed2k links into a BBC that links them accordingly.



Changelog
GitHub

SMF Tricks - Free & Premium Responsive Themes for SMF.

Lucarella

Hi, in the last few days (after the SMF updates to 2.15/2.1.6) I'm getting this error related to the ed2k mod:
https://dd-crew.net/forum/index.php?topic=93284
 /home/ddcrewne/public_html/forum/Sources/Class-ed2k.php (Linea 94)

Ed2k::fileSize(): Argument #1 ($size) must be of type int, string given, called in /home/ddcrewne/public_html/forum/Sources/Class-ed2k.php on line 76
It's not very serious, but I noticed that some topics don't open because they generate this error...
How can I solve it?

Thanks

Diego Andrés

I am not able to reproduce the issue, what version of PHP are you using?
I tested up to PHP 8.3

You can try changing this line in Sources/Class-ed2k.php
Code (Search) Select
$size = $ed2k_data[3] ?? 0;
Code (Replace) Select
$size = (int) $ed2k_data[3] ?? 0;

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: