[pmwiki-devel] PHP errors and warnings

1 view
Skip to first unread message

Simon

unread,
Jun 20, 2021, 4:04:35 AM6/20/21
to PmWiki Devel Mailing List
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

regards 

Simon

Petko Yotov

unread,
Jun 22, 2021, 5:48:00 AM6/22/21
to Simon, PmWiki Devel Mailing List
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
_______________________________________________
pmwiki-devel mailing list
pmwiki...@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel
Reply all
Reply to author
Forward
0 new messages