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

            Bug ID: 66720
           Summary: Api prop=redirects answers with [] when no redirects
                    exist
           Product: MediaWiki
           Version: 1.24-git
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: API
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
       Web browser: ---
   Mobile Platform: ---

api.php?action=query&prop=redirects&format=json&rdlimit=10&titles=Foobar&generator=redirects&grdlimit=10

Answers with

{
    "query": {
        "pages": {
            "111": {
                "pageid": 111,
                "ns": 0,
                "title": "Foobar",
                "redirects": [
                    {
                        "pageid": "222",
                        "ns": 0,
                        "title": "Foobar 2"
                    },
                    {
                        "pageid": "333",
                        "ns": 0,
                        "title": "Foobar 3"
                    }
                ]
            }
        }
    }
}

when redirects exits, but it answers with

[]

when no redirects exists.

Expected result:
{
    "query": {
        "pages": {
            "111": {
                "pageid": 111,
                "ns": 0,
                "title": "Foobar",
                "redirects": []
            }
        }
    }
}

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