[pmwiki-users] Fix blogit for use with PHP 5.5

Petko Yotov 5ko at 5ko.fr
Sat Nov 1 14:07:06 CDT 2014


On 30.10.2014 22:41, DaveG wrote:
> 2. All: Is there a preference to using Markup_e over Markup?

No, simply Markup_e() should be easier (less code) in some cases which I 
assumed will be frequent.

> I went
> ahead and used anon functions with Markup, just to make things
> internally consistent.

This is fine as long as your recipe is intended to only work with PHP 
5.3 and more recent:

   http://php.net/manual/en/functions.anonymous.php

> 3. All: Any suggestions for this:
>    $bodyTags = (preg_match_all('/\[\[\!(.*?)\]\]/e', $body, $match)
> ?$match[1] :array());
> 
>    To be honest I'm not entirely sure why the e modifier is used
> there, but assuming it's needed, do we have Pm helper functions for
> preg_match_all?

The "e" part should not be needed - it is ignored by preg_match_all().

Petko




More information about the pmwiki-users mailing list