https://bugzilla.wikimedia.org/show_bug.cgi?id=49397

       Web browser: ---
            Bug ID: 49397
           Summary: Template call property assignment of a decimal without
                    a digit before decimal misinterprets value
           Product: MediaWiki extensions
           Version: master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: Semantic MediaWiki
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

Created attachment 12507
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=12507&action=edit
SMW_DV_Number.php with corrected regex in parseNumberValue

A template call with a decimal property assignment whose value is between 0 and
1 without a leading 0 strips the decimal point and incorrectly parses the
result as though it were an integer value.  For example, an assignment like
this:

|Myproperty=.1200

is parsed and stored in the database as Myproperty = 1200 instead of Myproperty
= 0.12.

The bug is in the regex in
extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Number.php in the
parseNumberValue function.  The fixed version is attached.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to