<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#333399" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Moni!<br>
Op 5-2-2018 om 11:36 schreef Moni Kellermann:<br>
</div>
<blockquote type="cite"
cite="mid:36f774fb-6ad9-de09-88f8-d6ef74a186a9@gmail.com">Am
02.02.2018 um 18:51 schrieb Petko Yotov:
<br>
<blockquote type="cite">Hello. PmWiki version 2.2.107 was
published today
<br>
</blockquote>
<br>
Thank you, Petko! :))
<br>
</blockquote>
<blockquote type="cite"
cite="mid:36f774fb-6ad9-de09-88f8-d6ef74a186a9@gmail.com">
<br>
I am trying out this skin:
<br>
<a class="moz-txt-link-freetext" href="http://www.pmwiki.org/wiki/Skins/Vanilla5">http://www.pmwiki.org/wiki/Skins/Vanilla5</a>
<br>
<br>
With PmWiki 2.2.107 running on XAMPP/PHP 7.21, I now get the error
<br>
<br>
Deprecated: Function create_function() is deprecated in
C:\xampp\htdocs\pmwiki-2.2.107\pmwiki.php on line 481
<br>
<br>
which refers to the section
<br>
<br>
function PCCF($code, $template = 'default', $args = '$m') {
<br>
global $CallbackFnTemplates, $CallbackFunctions;
<br>
if (!isset($CallbackFnTemplates[$template]))
<br>
Abort("No \$CallbackFnTemplates[$template]).");
<br>
$code = sprintf($CallbackFnTemplates[$template], $code);
<br>
if (!isset($CallbackFunctions[$code])) {
<br>
$fn = create_function($args, $code);
<br>
if ($fn) $CallbackFunctions[$code] = $fn;
<br>
else StopWatch("Failed to create callback function:
".PHSC($code));
<br>
}
<br>
return $CallbackFunctions[$code];
<br>
}
<br>
<br>
and specifically the line
<br>
<br>
$fn = create_function($args, $code);
<br>
<br>
I understand that create_function is deprecated in PHP 7.21, and
that the fault is with the skin, not with PmWiki, as the standard
skins do not trigger this.
<br>
<br>
Which means that a) we need to fix both pmwiki.php as well as the
skin.
<br>
I get the same error with the Twitter Bootstrap skin.
<br>
<br>
Both those skins work with 2.2.107 when running XAMPP/PHP 5.6.33.
<br>
<br>
<br>
moni k.
<br>
<br>
<br>
</blockquote>
<p>As author of the skin Vanilla5, I am feeling obliged to respond
here. My webserver does not use PHP7.2 yet, so I did not encounter
any problems YET. I don't feel confident enough programming in
PHP to offer you a real fix. <br>
</p>
<p>In the mean time, you can get it working by commenting out the 2
lines in the bottom section of "skin.php" which call the
Markup_e() function. It should look like this:<br>
</p>
<div style="color: #d4d4d4;background-color: #1e1e1e;font-family: Consolas, 'Courier New', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #9cdcfe;">$FmtPV</span><span style="color: #d4d4d4;">[</span><span style="color: #ce9178;">'$SearchBar'</span><span style="color: #d4d4d4;">] = </span><span style="color: #ce9178;">"</span><span style="color: #d7ba7d;">\$</span><span style="color: #ce9178;">GLOBALS['TmplDisplay']['PageSearchFmt']"</span><span style="color: #d4d4d4;">;</span></div><div><span style="color: #dcdcaa;">#Markup_e</span><span style="color: #d4d4d4;">(</span><span style="color: #ce9178;">'nosearch'</span><span style="color: #d4d4d4;">, </span><span style="color: #ce9178;">'directives'</span><span style="color: #d4d4d4;">, </span><span style="color: #d16969;">'/</span><span style="color: #d7ba7d;">\\(</span><span style="color: #d16969;">:nosearch:</span><span style="color: #d7ba7d;">\\)</span><span style="color: #d16969;">/i'</span><span style="color: #d4d4d4;">, </span><span style="color: #ce9178;">"SetTmplDisplay('PageSearchFmt',0)"</span><span style="color: #d4d4d4;">);</span></div><div><span style="color: #9cdcfe;">$FmtPV</span><span style="color: #d4d4d4;">[</span><span style="color: #ce9178;">'$TabsBar'</span><span style="color: #d4d4d4;">] = </span><span style="color: #ce9178;">"</span><span style="color: #d7ba7d;">\$</span><span style="color: #ce9178;">GLOBALS['TmplDisplay']['PageTabsFmt']"</span><span style="color: #d4d4d4;">;</span></div><div><span style="color: #dcdcaa;">#Markup_e</span><span style="color: #d4d4d4;">(</span><span style="color: #ce9178;">'notabs'</span><span style="color: #d4d4d4;">, </span><span style="color: #ce9178;">'directives'</span><span style="color: #d4d4d4;">, </span><span style="color: #d16969;">'/</span><span style="color: #d7ba7d;">\\(</span><span style="color: #d16969;">:notabs:</span><span style="color: #d7ba7d;">\\)</span><span style="color: #d16969;">/i'</span><span style="color: #d4d4d4;">, </span><span style="color: #ce9178;">"SetTmplDisplay('PageTabsFmt',0)"</span><span style="color: #d4d4d4;">);</span></div>
</div>
<p>You loose the functionality of disabling and enabling the
(:nosearch:) and (:notabs:) directives. It should now be working.
<br>
</p>
<p><br>
</p>
<p>with regards,</p>
<p>Paul Wiegmans</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>