Menu

#2986 utf8_decode is deprecated

v4.3.1
closed-fixed
None
5
2026-06-18
2026-06-09
GaryT
No

[09-Jun-2026 14:42:01 America/Boise] PHP Deprecated: Function utf8_decode() is deprecated in .../genealogy/includes/functions/functions_mail.php on line 323

Discussion

  • Gerry Kroll

    Gerry Kroll - 2026-06-10
    • assigned_to: Gerry Kroll
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -0,0 +1 @@
    +functions_mail.zip (9.0 kB; application/x-zip-compressed)
    
    • Group: v4.3.0 --> v4.3.1
     
    • Tomasz Babczyński

      Shouldn't the parameters of mb_convert_encoding be in opposite
      direction: 'ISO-8859-1', 'UTF-8'. It was utf8_decode function, not
      encode. We want to check whether the string contained any characters not
      in ascii code, therefore we should to convert from utf to ascii.

      T.B.

       
  • Gerry Kroll

    Gerry Kroll - 2026-06-10

    Please try the attached file functions_mail.zip.

    As usual, unzip into a temporary folder and then replace the file /includes/functions/functions_mail.php in your PGV install directory.

    Let us know whether this works for you, so that the SVN repository can be updated.

     
  • Gerry Kroll

    Gerry Kroll - 2026-06-10

    Tomaz:
    You are absolutely correct. Thanks for that.

    The attached file is hopefully correct now.

     
  • Gerry Kroll

    Gerry Kroll - 2026-06-12
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +0,0 @@
    -functions_mail.zip (9.0 kB; application/x-zip-compressed)
    
     
  • Gerry Kroll

    Gerry Kroll - 2026-06-12

    I've gone through the PGV code and found several other instances of utf8_decode as well as utf8_encode.

    The attached ZIP file (Fix2986.zip) contains all the corrected PGV scripts. You should find the directories /includes/controllers and /includes/functions in that ZIP file.

    Unzip the attached file to a temporary folder and then copy the contents of that folder to the directory where PGV is installed, letting the copy over-write what's already there.

    Please let us know whether there are more problems with this fix.

     
  • GaryT

    GaryT - 2026-06-14

    Is there something sensible to test it with? I suspect it was triggered by a spammer or a spider previously

     
  • Gerry Kroll

    Gerry Kroll - 2026-06-14

    That is an excellent question.

    The original bug report was triggered by an attempt to send an email to the site admin (probably), using the mail system built into PHP instead of the PHPMailer package that is used when the site is configured for SMTP mailing.

    The other instances of the use of deprecated PHP functions occur in the Clipboard and Export/Import functions when the external file character set is Latin-1/ANSI/ASCII instead of UTF-8. You will recall that PGV uses UTF-8 internally, so when the external file isn't in UTF-8, conversion is necessary.

    <rant> I wish those PHP folks would stop "improving" the language such that existing programs are killed. That never happened when I was a member of the COBOL language development team!</rant>

     
  • Gerry Kroll

    Gerry Kroll - 2026-06-18
    • status: open --> closed-fixed
     
  • Gerry Kroll

    Gerry Kroll - 2026-06-18

    Fixed in SVN 7384

     

Log in to post a comment.

Monday.com Logo