News:

Dear jDownloads users, There is currently no Joomla 6 compatible version available. However, we are working on it and hope to release it shortly.

Main Menu
Support-Forum

jDownloads 4.1.9 – PHP 8.5 deprecated casting syntax

Started by Viking DataForge, 26.11.2026 22:18:24

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Viking DataForge

Hello,

I encountered two PHP deprecation warnings when running jDownloads 4.1.9 Stable with PHP 8.5.

**Environment:**
- Joomla 6.2.1
- jDownloads 4.1.9 Stable
- PHP 8.5.4
- Windows / Laragon local development environment

**Affected file:**

components/com_jdownloads/src/Helper/JDHelper.php

**Issue 1 – Line 1399**

Original:
`$diff = (Integer) (($date1 - $date2) / 3600/24);`

Corrected:
`$diff = (int) (($date1 - $date2) / 3600/24);`

**Issue 2 – Line 2973**

Original:
`mt_srand((double)microtime()*1000000);`

Corrected:
`mt_srand((float)microtime()*1000000);`

Both casting aliases are deprecated in PHP 8.5.

I have tested both corrections on my local installation, and they successfully eliminated the deprecation warnings.

These are minor syntax changes that preserve the existing functionality.

I hope these corrections can be incorporated into a future maintenance release.

Thank you for your work on jDownloads.
  •  
    The following users thanked this post: Arno

Arno

Hi Viking DataForge,
thank you for the precise report and for testing the corrections. Both replacements are correct: (int) and (float) preserve the existing casting behaviour and avoid these PHP 8.5 deprecation warnings.

We have also seen these warnings in another installation's logs. We'll take these two changes into account for a future maintenance update.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •