01526: recipecheck issue
Description: Using recipecheck
In diag.php, the line 124 :
if (!@$v['Version']) continue;
gives the error : Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /Users/domotic/Sites/pmwiki/scripts/diag.php:124 Stack trace: #0 /Users/domotic/Sites/pmwiki/pmwiki.php(591): HandleRecipeCheckCore('Main.HomePage', 'admin') #1 /Users/domotic/Sites/pmwiki/pmwiki.php(568): HandleDispatch('Main.HomePage', 'recipecheck') #2 {main} thrown in /Users/domotic/Sites/pmwiki/scripts/diag.php on line 124
Works fine when changed to :
if (!isset($v['Version'])) continue; # yDcl le 13/10/2025 : works fine ?
PHP new feature ?
I also changed (too big font used)
$markup = "!!Recipe status for {\$PageUrl}\n".RecipeTableCore($rinfo, $cvinfo);
to
$markup = "!!!!!Recipe status for {\$PageUrl}\n".RecipeTableCore($rinfo, $cvinfo);
Thanks for noticing, should be fixed for 2.5.3, due soon. I suspect you have a recipe in pmwiki/cookbook that has an incorrect $RecipeInfo
variable - if you find out which one let us know and we may be able to update it. The correct variable look like this:
$RecipeInfo['MyRecipe']['Version'] = '20250623';
The one that gives this error might look like this:
$RecipeInfo['MyRecipe'] = '20250623'; # FATAL ERROR
Concerning the font size, I added a wrapping element with the class name "recipecheck" so from 2.5.3 you could style the heading in pub/css/local.css. --Petko
div.recipecheck h2 { font-size: 1.1rem; }
Found the cookbook : ptvreplace.php, very old.
And this cookbook doesn't work anymore. I don't use often that part of my (personal) website.
(I am upgrading everything up to date)