Use isset to protect against Undefined index PHP notice.
authorDerk-Jan Hartman <hartman@users.mediawiki.org>
Sun, 31 Oct 2010 22:10:44 +0000 (22:10 +0000)
committerDerk-Jan Hartman <hartman@users.mediawiki.org>
Sun, 31 Oct 2010 22:10:44 +0000 (22:10 +0000)
includes/api/ApiUpload.php

index 13268a7..f423347 100644 (file)
@@ -112,7 +112,7 @@ class ApiUpload extends ApiBase {
                $this->requireOnlyOneParameter( $this->mParams,
                        'sessionkey', 'file', 'url', 'statuskey' );
 
-               if ( $this->mParams['statuskey'] ) {
+               if ( isset( $this->mParams['statuskey'] ) ) {
                        // Status request for an async upload
                        $sessionData = UploadFromUrlJob::getSessionData( $this->mParams['statuskey'] );
                        if ( !isset( $sessionData['result'] ) ) {