Merge "Remove incorrect timezone conversion from date parameters"
[lhc/web/wiklou.git] / includes / api / ApiBase.php
index be4eeef..ac07eeb 100644 (file)
@@ -1246,8 +1246,8 @@ abstract class ApiBase extends ContextSource {
                        // Preserve U+001F for self::parseMultiValue(), or error out if that won't be called
                        if ( isset( $value ) && substr( $rawValue, 0, 1 ) === "\x1f" ) {
                                if ( $multi ) {
-                                       // This loses the potential $wgContLang->checkTitleEncoding() transformation
-                                       // done by WebRequest for $_GET. Let's call that a feature.
+                                       // This loses the potential checkTitleEncoding() transformation done by
+                                       // WebRequest for $_GET. Let's call that a feature.
                                        $value = implode( "\x1f", $request->normalizeUnicode( explode( "\x1f", $rawValue ) ) );
                                } else {
                                        $this->dieWithError( 'apierror-badvalue-notmultivalue', 'badvalue_notmultivalue' );
@@ -1289,7 +1289,7 @@ abstract class ApiBase extends ContextSource {
                                        case 'text':
                                        case 'password':
                                                if ( $required && $value === '' ) {
-                                                       $this->dieWithError( [ 'apierror-missingparam', $paramName ] );
+                                                       $this->dieWithError( [ 'apierror-missingparam', $encParamName ] );
                                                }
                                                break;
                                        case 'integer': // Force everything using intval() and optionally validate limits
@@ -1443,7 +1443,7 @@ abstract class ApiBase extends ContextSource {
                                }
                        }
                } elseif ( $required ) {
-                       $this->dieWithError( [ 'apierror-missingparam', $paramName ] );
+                       $this->dieWithError( [ 'apierror-missingparam', $encParamName ] );
                }
 
                return $value;