01437: ASCIIMath fatal bugs

Summary: ASCIIMath fatal bugs
Created: 2019-02-08 11:48
Status: ToDo
Category: Cookbook
From: mykhal
Priority: 4
Version: 2.2.112
OS: Debian/Apache/7.0.33

Description: PmWiki ASCIIMath recipe code is rather old, it even causes ASCIIMath(prev. last non-bug. webarch. ver.) to show just:

Parse error: syntax error, unexpected 'new' (T_NEW) in /home/pmwiki/pmwiki/cookbook/asciimath.php ...

... because of obsolete syntax:

$ascii_math =& new ASCIIMathPHP(...

There are more problems, trying to fix another bug:

PHP Fatal error: 'continue' not in the 'loop' or 'switch' context in (...)/pmwiki-2.2.112/cookbook/asciimath.php on line 103

in the code:

function purgePreviousEquationIfNeeded($dir, $basename, $once = true) {
  $dfp = opendir($dir); if (!$dfp) continue;

by replacing continue with return, causes incomplete PmWiki (any) page rendering regardless of using ASCIIMath syntax.

mykhal February 08, 2019, at 11:50 AM

Thanks, I've disabled the recipe on the Cookbook -- I've contacted the maintainer for a fix. --Petko February 08, 2019, at 12:05 PM

The maintainer, Dfaure, sent me an updated version, please get at ASCIIMath it and report if any difficulties. --Petko February 11, 2019, at 09:18 AM