Author: jean-christian.imbeault
Description:
While trying to get an extension to run I got the following in my apache error
logs. The extension worked fine in 1.3.10
[error] PHP Warning: end(): Passed variable is not an array or object in
/home/imbeauje/apache/htdocs/wiki/includes/Parser.php on line 425
[error] PHP Warning: end(): Passed variable is not an array or object in
/home/imbeauje/apache/htdocs/wiki/includes/Parser.php on line 425
[error] PHP Warning: end(): Passed variable is not an array or object in
/home/imbeauje/apache/htdocs/wiki/includes/Parser.php on line 425
[error] PHP Warning: end(): Passed variable is not an array or object in
/home/imbeauje/apache/htdocs/wiki/includes/Parser.php on line 425
[error] PHP Notice: Undefined index: html in
/home/imbeauje/apache/htdocs/wiki/includes/Parser.php on line 373
[error] PHP Fatal error: Unsupported operand types in
/home/imbeauje/apache/htdocs/wiki/includes/Parser.php on line 373
In case it is useful here is my extension:
$wgExtensionFunctions[] = "wfTableSchema";
function wfTableSchema() {
global $wgParser; $wgParser->setHook( "tableSchema", "renderTableSchema" );
}
function renderTableSchema( $input )
{
global $wgTitle, $wgParser; $CLASSPATH =
"/home/imbeauje/WEBTEAM/HEAD/mrw/Tools/src/:/home/imbeauje/WEBTEAM/HEAD/mrw/Tools/lib/jconn2.jar";
$title = $wgTitle->getDBkey(); //title is of the form database..tableName. Parse to extract list($dbName, $tableName) = explode("..", $title); $dbName = strtolower($dbName); //then pass as params to java prog that will generate table $cmd = "/home/imbeauje/j2sdk1.4.2_06/bin/java -classpath $CLASSPATH ". "com.mizuho.rws.tools.wikiTools.WikiDatabaseTableGenerator $dbName
$tableName";
$output = `$cmd`; $output = $wgParser->internalParse($output, 0); return $output;
}
?>
Version: 1.4.x
Severity: normal
OS: Linux