On 2015-05-15 14:32, ABClf wrote:
I'm trying to build an updated version of my website, notably using
FastCache recipe, and I get a few errors related to php 5.5.
Among others, FastCache recipe is subject to this issue.
You may prefer to write more precise subject lines on messages, for
example "Cookbook recipe FastCache PHP 5.5 compatibility". This way the
author of the recipe may notice it more quickly and reply and fix it.
Exploring the code, it looks like there is only one line using the
deprecated code in the markup declaration, at the very beginning. Here
it
is :
Markup( 'nofastcache', 'directives', '/\\(:nofastcache:\\)/ei', "PZZ(
\$GLOBALS['FastCacheValid'] = FALSE )" );
I don't know how to fix it : the documentation at PmWiki/CustomMarkup
doesn't talk about this case
There are examples how to convert older markup rules to the new format.
1. Replace "Markup(" with "Markup_e(".
2. In the "search" pattern, don't use the /e modifier (remove the letter
"e" after the slash).
3. In the "replace" code, replace '$1', '$2', etc. with \$m[1], \$m[2],
etc.; remove any PSS() calls.
In your case you don't have things like '$1' to replace, so it is
simpler:
Markup_e('nofastcache', 'directives',
'/\\(:nofastcache:\\)/i', "PZZ(\$GLOBALS['FastCacheValid'] = FALSE)");
"Markup_e($name, $when, $pattern, $replace);
* $pattern cannot have an "/e" modifier
* $replace can be a string with program code to be evaluated;
note that the matches can be accessed with $m[1], $m[2]
instead of '$1', '$2'
and PmWiki/CustomMarkupAlt, which does, has
not been updated to handle php5.5 new rules.
May someone help fixing this case ?
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users