summaryrefslogtreecommitdiff
path: root/includes/Math.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
committerPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
commita58285fd06c8113c45377c655dd43cef6337e815 (patch)
treedfe31d3d12652352fe44890b4811eda0728faefb /includes/Math.php
parent20194986f6638233732ba1fc3e838f117d3cc9ea (diff)
Aktualisierung auf MediaWiki 1.9.0
Diffstat (limited to 'includes/Math.php')
-rw-r--r--includes/Math.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/includes/Math.php b/includes/Math.php
index a8b33984..9fa631f7 100644
--- a/includes/Math.php
+++ b/includes/Math.php
@@ -39,6 +39,9 @@ class MathRenderer {
# No need to render or parse anything more!
return ('$ '.htmlspecialchars( $this->tex ).' $');
}
+ if( $this->tex == '' ) {
+ return; # bug 8372
+ }
if( !$this->_recall() ) {
# Ensure that the temp and output directories are available before continuing...
@@ -75,12 +78,13 @@ class MathRenderer {
$retval = substr ($contents, 0, 1);
$errmsg = '';
if (($retval == 'C') || ($retval == 'M') || ($retval == 'L')) {
- if ($retval == 'C')
+ if ($retval == 'C') {
$this->conservativeness = 2;
- else if ($retval == 'M')
+ } else if ($retval == 'M') {
$this->conservativeness = 1;
- else
+ } else {
$this->conservativeness = 0;
+ }
$outdata = substr ($contents, 33);
$i = strpos($outdata, "\000");
@@ -89,12 +93,13 @@ class MathRenderer {
$this->mathml = substr($outdata, $i+1);
} else if (($retval == 'c') || ($retval == 'm') || ($retval == 'l')) {
$this->html = substr ($contents, 33);
- if ($retval == 'c')
+ if ($retval == 'c') {
$this->conservativeness = 2;
- else if ($retval == 'm')
+ } else if ($retval == 'm') {
$this->conservativeness = 1;
- else
+ } else {
$this->conservativeness = 0;
+ }
$this->mathml = NULL;
} else if ($retval == 'X') {
$this->html = NULL;
@@ -118,7 +123,7 @@ class MathRenderer {
$this->hash = substr ($contents, 1, 32);
}
- $res = wfRunHooks( 'MathAfterTexvc', array( &$this, &$errmsg ) );
+ wfRunHooks( 'MathAfterTexvc', array( &$this, &$errmsg ) );
if ( $errmsg ) {
return $errmsg;