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

--- Comment #6 from Smallman <m8r-udf...@mailinator.com> 2010-02-21 14:14:24 
UTC ---
I've looked at
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiQuerySiteinfo.php
and the problem is that it assumes there are parameters.

What it should say is something like this

    public function execute() {
        $params = $this->extractRequestParams();
        if(empty($params))
            ApiBase :: dieDebug( __METHOD__, "No prop specified..." );
        else
        {
        $done = array();
        foreach ( $params['prop'] as $p )
        {
          ....

It could give better error handling, but it would suffice for now...

It's probably best to add something into extractRequestParams() to make it
return an error code when no params are given, rather than go through and add
if(empty($params)) to all of the api php scripts...

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to