PassMark Logo
Home » Forum

PHP8.4 Warning in report.php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tapio
    Member
    • Nov 2018
    • 27

    #1

    PHP8.4 Warning in report.php

    Upgrading to PHP8.4 gives a warning in report.php-file:
    "Deprecated: fgetcsv(): the $escape parameter must be provided as its default value will change in ...\report.php on line 542"
  • David
    Administrator
    • Dec 2004
    • 4715

    #2
    Change line 542 in report.php:

    Old line:
    Code:
    while (($data[$row] = fgetcsv($handle, 0, ",")) !== FALSE)
    New line:
    Code:
    while (($data[$row] = fgetcsv($handle, 0, ",", '"', "\\")) !== FALSE)

    Comment

    • Tapio
      Member
      • Nov 2018
      • 27

      #3
      Thanks, this corrected the report.php file.

      Then, for curiosity, I also tested the compatibility in PHP 8.5, and got a new warning:
      "Deprecated: Non-canonical cast (double) is deprecated, use the (float) cast instead in ... \search.php on line 1826"

      In this line I tried to change the word '(double)' to '(float)', which seemed to work. But is that the correct measure and sufficient for the fix?

      Comment

      Working...