Thread:Extension talk:MsUpload/Error during upload

The following error comes up when I click on the File upload in the editor after selecting a file and confirm the upload:

Error: getToken; #echo $wgUser->getName; global $sCreateIndexFilepath; $sCreateIndexFilepath = false; $ignorewarnings = true; $text = ""; $comment = "MsUpload"; $watch = false; $error = false; if (isset($_FILES['file']['name'])) { $filename = $_FILES['file']['name']; if ($_POST['name'] != $filename) { //name was changed $filename = $_POST['name']; //echo 'changed!'; } $token = $wgUser->editToken; $wgEnableWriteAPI = true; if($version[1] == '17'){ #only version 1.17 $params = new FauxRequest(array ( 'action' => 'upload', 'file' => $_FILES['file'], 'filename' => $filename, 'filesize' => $_FILES['file']['size'], 'comment'=> $comment, 'ignorewarnings'=> true, //sonst wird nix ueberschrieben 'token' => $token,//$token."%2B%5C", )); }else{ $params = new FauxRequest(array ( 'action' => 'upload', 'file' => $_FILES['file'], 'filename' => $filename, 'filesize' => $_FILES['file']['size'], 'comment'=> $comment, 'ignorewarnings'=> true, //sonst wird nix ueberschrieben 'token' => $token,//$token."%2B%5C", ), true, $_SESSION ); } $enableWrite = true; // This is set to false by default, in the ApiMain constructor $api = new ApiMain($params,$enableWrite); #$api = new ApiMain($params); $api->execute; $data = & $api->getResultData; //$ret = Array("filename" => $filename, "data" => $data ); echo json_encode($data); return $data; //.$data; } exit(0); ?>

How can I fix it?