After downgrading to PHP 7.1 the error message disappeared
-
This reply was modified 6 years, 3 months ago by CyberBengt.
After downgrading to PHP 7.1 the error message disappeared
Hello Guys We had the same issue for a client today, and this error message is linked to the fact that in PHP 7.2 the count function needs the first parametter to be an array variable. Php 7.2 requires indicating variables as an array properly such: $myarray() and not like this $myarray = … , but in the code it is not done as such.
So the fix is to edit the file:
/wp-content/plugins/download-monitor/includes/product/class-dlm-product-manager.php on row 137
and change this code:
// loop products
if ( count( $products ) > 0 ) {
foreach ( $products as $product ) {
To this code:
// loop products
if ( $products > 0 ) {
foreach ( $products as $product ) {
Have fun 🙂
Franck
WordPress Peacekeeper
-
This reply was modified 6 years, 3 months ago by JungleWP.
Hey Franck,
Thanks for sharing the details. Currently, we are working on a major update “Download Monitor 4.0” which should be released within next few weeks. If any of you would like to do beta testing, please do email us at “support@download-monitor.com”.
This issue should be resolved in this upcoming version.