Support » Plugin: Email Before Download » Issue (solved) with PHP 7.2

  • Hi there,

    I recently switch from PHP 5.6 to PHP 7.2.

    The “email before download” plugin was then creating a PHP Warning :
    “count() parameter must be an array or an object that implements countable” for class-email-before-download-db.php, on line 56.

    Here is the line in question which was creating the warning :
    if (count($query) > 0) {

    I simply changed it to this, so the warning will disappear (and my website would work with PHP7.2) :
    if (count((array)$query) > 0) {

    Hope this might help the developers, or others who might have the same issue.

    Cheers

    Bastien

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi @bastien74

    I fixed this migration problem to PHP 7.2, with other solution.

    if (is_array($query) > 0) {

    Did you solve the problem with your solution?

    I hope the developers will fix this in the repository

    • This reply was modified 6 months, 1 week ago by vitotheboss.
Viewing 1 replies (of 1 total)
  • The topic ‘Issue (solved) with PHP 7.2’ is closed to new replies.