I'm having a problem with a parser function that reads a string from a database 
and displays it on a wiki page. The basic structure is this:

       static function myParserFunction($parser, $arg) {
         $value = getFromDatabase();
         return $value;
       }

Everything works great unless the value contains a multibyte character. In this 
case, after the parser function returns its value, something else goes wrong 
internal to MediaWiki and the ENTIRE content area of the article gets blanked. 
No PHP errors appear in the logs.

Here's another clue. If my parser function echoes the value instead of 
returning it:

       static function myParserFunction($parser, $arg) {
         $value = getFromDatabase();
         echo $value;
         return 'dummy';
       }

then the value appears without a problem in the browser. So the value is 
correctly read from the database, and correctly returned by the parser 
function, but it fouls up something downstream.

Does anyone know what's going on, or have suggestions on how to debug further?

Thanks,
DanB

_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to