better error message and comment
authorRyan Kaldari <kaldari@users.mediawiki.org>
Thu, 8 Mar 2012 00:34:42 +0000 (00:34 +0000)
committerRyan Kaldari <kaldari@users.mediawiki.org>
Thu, 8 Mar 2012 00:34:42 +0000 (00:34 +0000)
includes/api/ApiBase.php

index bf197b3..a8c3cc7 100644 (file)
@@ -811,8 +811,8 @@ abstract class ApiBase extends ContextSource {
 
                if ( $type == 'boolean' ) {
                        if ( isset( $default ) && $default !== false ) {
-                               // Having a default value of anything other than 'false' is pointless
-                               ApiBase::dieDebug( __METHOD__, "Boolean param $encParamName's default is set to '$default'" );
+                               // Having a default value of anything other than 'false' is not allowed
+                               ApiBase::dieDebug( __METHOD__, "Boolean param $encParamName's default is set to '$default'. Boolean parameters must default to false." );
                        }
 
                        $value = $this->getRequest()->getCheck( $encParamName );