jDownloads Support Forum

jDownloads for Joomla 4.x and 5.x => jDownloads 4.x - (This is the current version!) => Bugs! => Topic started by: Viking DataForge on 26.11.2026 22:18:24

Title: jDownloads 4.1.9 – PHP 8.5 deprecated casting syntax
Post by: Viking DataForge on 26.11.2026 22:18:24
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.
Title: Re: jDownloads 4.1.9 – PHP 8.5 deprecated casting syntax
Post by: Arno on 30.11.2026 17:49:49
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.