Last modified: 2009-01-12 14:46:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 10063 - ParserFunctions should document ctype requirement
ParserFunctions should document ctype requirement
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
ParserFunctions (Other open bugs)
unspecified
PC Linux
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-29 16:45 UTC by Iradigalesc
Modified: 2009-01-12 14:46 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Iradigalesc 2007-05-29 16:45:09 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).
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-05-29 20:50:07 UTC
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.
Comment 2 Iradigalesc 2007-05-29 21:43:07 UTC
OK, thanks! It works well now.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-06-06 19:23:16 UTC
Not resolved, still needs a hack to work.
Comment 4 Rob Church 2007-06-07 20:08:28 UTC
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.
Comment 5 Chad H. 2009-01-12 14:46:36 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links