PITS /
01578: PHP deprecated
Summary: PHP deprecated
Created: 2026-11-17 22:43
Status: Open
Category:
From: simon
Assigned:
Priority: 1
Version: 2.7.8
OS:
Description:
From the PHP error log
[17-Nov-2026 22:01:03 UTC] PHP Deprecated: preg_replace_callback(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/cavingor/public_html/pmwiki/pmwiki.php on line 3090
I'm testing an updated recipe (i.e. not the version on PmWiki), but I'm struggling to see how it is causing the issue.
It looks to me like an edge condition in a loop.
/home/cavingor/public_html/pmwiki/pmwiki.php:2412 => MarkupToHTML /home/cavingor/public_html/pmwiki/pmwiki.php:2383 => ProcessPrintFmt /home/cavingor/public_html/pmwiki/pmwiki.php:2373 => PrePrintFmt /home/cavingor/public_html/pmwiki/pmwiki.php:2363 => PrePrintFmt /home/cavingor/public_html/pmwiki/cookbook/migrateutf8.php:541 => PrintFmt /home/cavingor/public_html/pmwiki/cookbook/migrateutf8.php:505 => MigratePrintFmt
Is this a line containing 'cb_controlchars'? --Petko
Not as far as I know
$out = <<<EOF
...
EOF;
MigratePrintFmt($pagename, $out);
function MigratePrintFmt($pagename, $out) {
global $PageStartFmt, $PageEndFmt;
DisableSkinParts('Header Footer Left Right Title');
$markup = "markup:(:messages:)
! Migrating {\$WikiTitle} to UTF-8
Please review the documentation at Cookbook:MigrateUTF8 before using this tool.
----
$out
----
Please contact me at Cookbook:MigrateUTF8-Talk if you have any questions, difficulties, or suggestions for improvements.
";
$fmt = array($PageStartFmt,
"<div class='migrateutf8'>", $markup, "</div>",
$PageEndFmt);
session_write_close();
PrintFmt($pagename, $fmt);
exit;
}
It may not be relevant, but I'm not seeing this issue on Windows.