[pmwiki-users] Recipes you use/need to be updated for PHP 5.5

Petko Yotov 5ko at 5ko.fr
Thu Jan 9 17:53:20 CST 2014

John Rankin writes:
> On 9/01/14 6:35 PM, Petko Yotov wrote:
>> John Rankin writes:
>>> > John Rankin writes:
>>> >> On 8/01/14 12:31 PM, Petko Yotov wrote:
>> ...
>>> > 2. $pagename is not in the scope of the callback function,
>> ...
>>> Sorry, I over-simplified. In practice, the $LinkTidy array is defined once
>>> at the start and then referenced as a global variable several times in
>>> different places to do the actual tidying. So at the time $LinkTidy is
>>> defined, the code may not know the $pagename. Potentially, the tidying can
>>> apply to multiple different $pagename values as it assembles several wiki
>>> pages into one output.
>>> Do I use \$pagename instead?
>> Once again, $pagename is not automatically in the scope of the callback  
>> function. If you want to use $pagename in the callback, it must somehow get  
>> into that callback. If it does, yes, when defining the callback, use  
>> \$pagename.
> Of course; you said that before. Stupid me. Apologies.


I'm sorry if I wrote in a way that offended you. I didn't mean to. English  
is not my best language, or my second best language, but my third language.  
Anyone can imagine participating in such a discussion in their third best  

Sometimes I write too fast and I miss an important point. For example, now I  
see that in my messages I was documenting the usage of the new core  
functions. As a very experienced programmer, you certainly know all this  
just by reading the functions, and you don't have to use them if you don't  
want to. There are different ways to perform search and replace in a text  
string - use those that work when you test them and that suit you best.

Sorry again,

More information about the pmwiki-users mailing list