[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
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Diff:
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.
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.
Tomaz:
You are absolutely correct. Thanks for that.
The attached file is hopefully correct now.
Diff:
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.
Is there something sensible to test it with? I suspect it was triggered by a spammer or a spider previously
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>
Fixed in SVN 7384