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

       Web browser: ---
            Bug ID: 47096
           Summary: mw.LoadData results don't properly handle # operator
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Scribunto
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

When data is accessed through mw.LoadData, and that data contains nested
tables, the # operator (which is approximately but not exactly table length)
does not work correctly.

For example:

data = mw.LoadData( 'Module:MyData' );

Then asking for 

#(data.sub_table)

Appears to be consistently wrong.  I've worked up an example that seems to like
to show 0 consistently:

http://test2.wikipedia.org/wiki/Module_talk:LoadDataError

Experimenting with more complicated versions of this (i.e. tables nested inside
tables nested inside tables) led to even worse behavior that seemed to point to
uninitialized memory being returned, i.e. random values.  It also managed to
trigger the Wikimedia Foundation Error Message in some cases with complaints
about out of memory errors.  I'm not really sure why.

-- 
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