[pmwiki-devel] PHP errors and warnings

Petko Yotov 5ko at 5ko.fr
Tue Jun 22 02:47:06 PDT 2021


This probably comes from a recipe which saves some custom page attribute 
in the disk file when saving a wiki page.

If you're currently saving a page like Main.MyPage, look with a text 
editor at the disk file in wiki.d, either wiki.d/Main.MyPage or in a 
subdirectory like wiki.d/Main/Main.MyPage. In that file, the page 
attributes are at the start-of-line and look like this:

    author:123456=Simon
    csum:123456=My change summary

The warning comes from an attribute that has a colon ":" but it is not 
followed by a number (the timestamp).

Sometimes this can happen when a recipe saves a page via UpdatePage() 
and is trying to set the page attributes but the $Now variable is not 
defined as global. I suspect then you would have attributes like:

    author:=Simon
    csum:=My change summary

Alternatively it is possible that the recipe has a reason to use custom 
attributes that have a colon but after it they don't have a timestamp. 
Something like (speculating):

   food:lunch=Pizza

BTW the recipe may have already been updated and fixed. The page 
attribute stays in the disk file, until you delete it.

Petko

On 20/06/2021 10:03, Simon wrote:
> Having now encountered one bug in the upgrade to PHP 7.4 I'm trying to
> check the rest of my recipes out (this is a slow process).
> 
> I came across an error that is not immediately related to the inclusion 
> of
> a recipe,
> 
> PHP Warning:  A non-numeric value encountered in
> /home/ttcorgnz/public_html/pmwiki/pmwiki.php on line 1124
> 
> and I'm wondering what I should be looking out for in terms of the 
> cause



More information about the pmwiki-devel mailing list