Last modified: 2009-01-12 14:46:36 UTC
Hi, When I use the {{#ifexpr:}} function on a local MediaWiki installation with the latest version of ParserFunctions installed, I get the message Fatal error: Call to undefined function ctype_alpha() in /extensions/ParserFunctions/Expr.php on line 166. I get the message on previewing or when I try to save the page (I can't really save it because of the bug).
You need to install the ctype functions. See <http://us2.php.net/manual/en/ref.ctype.php>. ctype functions are compiled in by default; stuff may break if you explicitly disable them. You can fix this by adding the following one-line function somewhere: function ctype_alpha( $text ) { return preg_match( '/[a-z]*/i', $text ); } Or some more efficient version to taste, if you like.
OK, thanks! It works well now.
Not resolved, still needs a hack to work.
Well, if ctype is compiled in by default, then it isn't a bug if an extension depends upon it, provided we document this somewhere. It's worth remembering that MediaWiki itself depends upon PCRE, sessions, etc. which are also in the default configuration.
Per Rob, this isn't really a bug in ParserFunctions, merely a requirement to use it. Updated docs on [[mw:Extension:ParserFunctions]] to indicate this.