Fatal error on PHP 8.5

in Download Manager Free

Viewing 2 posts - 1 through 2 (of 2 total)
Jul 10, 2026 at 3:51 pm
#215012
Member
etc
OP

Upon upgrading sites to PHP 8.5, we started getting this error:

[08-Jul-2026 12:54:38 UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: int – string in /home/dcppq/public_html/wp-content/plugins/download-manager/src/__/FileSystem.php:176
Stack trace:
#0 /home/dcppq/public_html/wp-content/plugins/download-manager/src/wpdm-functions.php(57): WPDM\__\FileSystem::downloadFile(‘/home/dcppq/pub…’, ‘2020-11-04_area…’, 4194304, 1, Array)
#1 /home/dcppq/public_html/wp-content/plugins/download-manager/src/wpdm-start-download.php(107): wpdm_download_file(‘/home/dcppq/pub…’, ‘2020-11-04_area…’, 4096, 1, Array)
#2 /home/dcppq/public_html/wp-content/plugins/download-manager/src/__/Apply.php(316): include(‘/home/dcppq/pub…’)
#3 /home/dcppq/public_html/wp-includes/class-wp-hook.php(341): WPDM\__\Apply->triggerDownload(”)
#4 /home/dcppq/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
#5 /home/dcppq/public_html/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
#6 /home/dcppq/public_html/wp-settings.php(771): do_action(‘init’)
#7 /home/dcppq/public_html/wp-config.php(112): require_once(‘/home/dcppq/pub…’)
#8 /home/dcppq/public_html/wp-load.php(50): require_once(‘/home/dcppq/pub…’)
#9 /home/dcppq/public_html/wp-blog-header.php(13): require_once(‘/home/dcppq/pub…’)
#10 /home/dcppq/public_html/index.php(17): require(‘/home/dcppq/pub…’)
#11 {main}
thrown in /home/dcppq/public_html/wp-content/plugins/download-manager/src/__/FileSystem.php on line 176

It looks like a fix could be something along these lines, on line 158 of FileSystem.php:

if ( substr( $http_range, 0, 1 ) === ‘-‘ ) {
$start_range = $file_size – (int) substr( $http_range, 1 );
if ( $start_range < 0 ) {
$start_range = 0;
}

I’ve checked both the wordpress.org forum and this one, and haven’t seen anyone else reporting this. We have many sites running Download Manager, and this fix worked for one. Perhaps there’s something else we can do. Please let me know. Thank you!

Jul 10, 2026 at 4:09 pm
#215013
Moderator
Tahasin
Staff

Hello,

Thank you for reaching out and reporting this issue to us.
We are investigating it and will provide you with an update as soon as possible. Also share the download manager version that you are using.

Regards

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.