API: Actually use api-help-param-no-description
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 28 Oct 2014 17:23:34 +0000 (13:23 -0400)
committerUmherirrender <umherirrender_de.wp@web.de>
Thu, 30 Oct 2014 18:06:50 +0000 (18:06 +0000)
If $description is array( '' ), that should still trigger display of the
message.

Change-Id: Ifeb62d3c139e457ad6cfaddadc2a99d39f99948f

includes/api/ApiHelp.php

index 2ac246b..fdde4bd 100644 (file)
@@ -528,11 +528,11 @@ class ApiHelp extends ApiBase {
                                                        ->parse();
                                        }
 
-                                       if ( !$description && !$info ) {
-                                               $description[] = self::wrap(
+                                       if ( !array_filter( $description ) ) {
+                                               $description = array( self::wrap(
                                                        $context->msg( 'api-help-param-no-description' ),
                                                        'apihelp-empty'
-                                               );
+                                               ) );
                                        }
 
                                        // Add "deprecated" flag