[pmwiki-users] sourceblock.php & php 8 bug
Pavel Sanda
sanda at lyx.org
Sun Mar 3 05:29:51 PST 2024
Hello,
I failed to reach the maintainer of sourceblock.php provided on pmwiki cookbook.
I would like to report, that I am getting the following warning with php 8.1:
PHP Warning: Undefined array key "LinkedResourceExtras" in /var/wiki/farm.d/cookbook/sourceblock.php on line 335
PHP Warning: Trying to access array offset on null in /var/wiki/farm.d/cookbook/sourceblock.php on line 335
I think the issue is that LinkedResourceExtras is listed only as optional package (and I don't have it installed)
but this line does not checkt it even exists (and php 8 became very touchy about that):
if(!$RecipeInfo['LinkedResourceExtras']['Version']) return;
I just commented it out, but you might want to fix it properly on the wiki.
I also see another issue:
PHP Warning: Undefined variable $PageUrl in /var/wiki/farm.d/cookbook/jumpbox.php on line 20
Not sure about the best fix, but this variable should be checked for existence first I think...
Thanks and regards,
Pavel
More information about the pmwiki-users
mailing list