Last modified: 2010-05-15 15:59:39 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14844, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12844 - Wrong errormessage from includes/Math.php
Wrong errormessage from includes/Math.php
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.11.x
PC Linux
: Low trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
http://agert.homelinux.org/blog/index...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-31 10:26 UTC by Fredrik Agert
Modified: 2010-05-15 15:59 UTC (History)
1 user (show)

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


Attachments
Suggested change row 112-118 add break; statement (8.76 KB, text/plain)
2008-01-31 10:40 UTC, Fredrik Agert
Details

Description Fredrik Agert 2008-01-31 10:26:10 UTC
in file ../includes/Math.php

Debugging my wiki I keep getting 'math_unknown_error' from the code line 113-118 even 
though the $retval is set to 'E' meaning 'math_lexing_error'

switch block has no "break;"-statement
current code
<pre>
            switch( $retval ) {
               case 'E': $errmsg = $this->_error( 'math_lexing_error', $errbit );
               case 'S': $errmsg = $this->_error( 'math_syntax_error', $errbit );
               case 'F': $errmsg = $this->_error( 'math_unknown_function', $errbit );
               default:  $errmsg = $this->_error( 'math_unknown_error', $errbit );
            }
</pre>
suggested change
<pre>
            switch( $retval ) {
               case 'E': $errmsg = $this->_error( 'math_lexing_error', $errbit );
               break;
               case 'S': $errmsg = $this->_error( 'math_syntax_error', $errbit );
               break;
               case 'F': $errmsg = $this->_error( 'math_unknown_function', $errbit );
               break;
               default:  $errmsg = $this->_error( 'math_unknown_error', $errbit );
            }
</pre>
Comment 1 Fredrik Agert 2008-01-31 10:40:50 UTC
Created attachment 4599 [details]
Suggested change row 112-118 add break; statement
Comment 2 Huji 2008-01-31 13:43:52 UTC
Sorry, but I'm afraid you're not using the "current" code as you said.

r1=24065&r2=26184">http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/Math.php?r1=24065&r2=26184

That link shows the bug you mentioned was fixed (by robchurch) on Sep 27 2007.
Comment 3 Fredrik Agert 2008-01-31 13:55:17 UTC
Sorry for bugging you but when redownloading 1.11.1 from http://download.wikimedia.org/mediawiki/1.11/mediawiki-1.11.1.tar.gz the patch as seen on SVN is not in the release. What happened?
b.r. //Fredrik
Comment 4 Raimond Spekking 2008-01-31 14:04:11 UTC
1.11.1 is a security release only and does not contain any other bugfixes/patches added since release of 1.11.0 on Sep 10 2007.

The above patch will be part of 1.12.0

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


Navigation
Links