01461: PHP 8

Summary: PHP 8
Created: 2020-12-01 06:14
Status: InProgress
Category: PHP Compatibility
Priority: 4
Version: 2.2.135

Description: PHP 8 has made a number of breaking changes, so code that previously worked fine now needs to be rewritten.

On this page we keep track of the work done and pending to update the core codebase for PHP 8.

Note: reports should be made for the latest release or for the nightly snapshot. If you use an older version, please upgrade first.

Pending issues

Please add new reports below this line.

If $LinkWikiWords = 1; is set I get warnings like the following on pages which contains CamelCase words:

  Warning: Undefined array key "EximCfgMain" in /home/www/pmwiki/scripts/wikiwords.php on line 66

Thanks, this was fixed for the next version (due in a few days). --Petko April 13, 2021, at 03:25 PM

Closed issues

Click to toggle past issues

Under php 8.0 pmwiki enters in infinite loop. It's because of change of comparing rules in php 8.0.

In pmwiki.php (line 1580) instead of

  if ($depth == 0) $depth = strlen($depth);
  if ($icol == 0) $icol = strlen($icol);

must be

  if (!is_numeric($depth)) $depth = strlen($depth);
  if (!is_numeric($icol)) $icol = strlen($icol);

Yury Finkel? December 01, 2020, at 06:14 AM

Made this change manually on my system as php 8 just dropped on Arch linux. pmwiki works with these changes...

...thanks Yury.

...Roy H

well - the pages render and load (which they didn't before) - but editing still doesn't work. Uncaught TypeError: Unsupported operand types int & arry line 2182 of pmwiki.php. Probably several more things to fix for the new version of PHP.


I'll publish the next version that fixes these and a few other compatibilities (Forms) in the next few days, this week or early next week. --Petko January 28, 2021, at 08:30 PM

What a blessing to have you.

MFWolff January 29, 2021, at 07:08 AM

All the above, and a few I found myself, were fixed. If there are any others, please report them in the "Pending issues" section. --Petko January 31, 2021, at 05:19 PM