Godlike Productions |
If you run SMF 2.0 and are running the Downloads Pro plugin (around v4.1.8) from SMF Hacks, the plugin will start throwing errors if you upgrade to php 7 if you have the download rate limiter installed (ie the number of minutes a user needs to wait before they can download).
On the Mastering VAST forum, we have this enabled for the free membership group, as a way of controlling bandwidth, associated with the downloads.
The errors we were seeing were:
Call to undefined function mysql_num_rows()
The reason for this error is the deprecation of mysql_ functions in php 7.
Fortunately the fix is really easy.
Change line 9686 of Downloads2.php from:
$totalRow['total'] = mysql_num_rows($dbresult);
to
$totalRow['total'] = mysqli_num_rows($dbresult);
That's it. Save the file and refresh the cache, and your users
SMF Hacks has confirmed that they have fixed this in later versions of their plugin.