Fix for r113993: don't log UsageException instances
[lhc/web/wiklou.git] / includes / api / ApiMain.php
index 8c035dc..10540a3 100644 (file)
@@ -80,6 +80,7 @@ class ApiMain extends ApiBase {
                'patrol' => 'ApiPatrol',
                'import' => 'ApiImport',
                'userrights' => 'ApiUserrights',
+               'options' => 'ApiOptions',
        );
 
        /**
@@ -361,7 +362,7 @@ class ApiMain extends ApiBase {
                        $this->executeAction();
                } catch ( Exception $e ) {
                        // Log it
-                       if ( $e instanceof MWException ) {
+                       if ( !( $e instanceof UsageException ) ) {
                                wfDebugLog( 'exception', $e->getLogMessage() );
                        }