Use (int) rather than intval()
[lhc/web/wiklou.git] / includes / api / ApiBase.php
index dfaff8b..4898385 100644 (file)
@@ -1282,7 +1282,7 @@ abstract class ApiBase extends ContextSource {
                                                                }
                                                        }
                                                } else {
                                                                }
                                                        }
                                                } else {
-                                                       $value = intval( $value );
+                                                       $value = (int)$value;
                                                        if ( !is_null( $min ) || !is_null( $max ) ) {
                                                                $this->validateLimit( $paramName, $value, $min, $max, null, $enforceLimits );
                                                        }
                                                        if ( !is_null( $min ) || !is_null( $max ) ) {
                                                                $this->validateLimit( $paramName, $value, $min, $max, null, $enforceLimits );
                                                        }
@@ -1311,7 +1311,7 @@ abstract class ApiBase extends ContextSource {
                                                                : $paramSettings[self::PARAM_MAX];
                                                        $this->getResult()->addParsedLimit( $this->getModuleName(), $value );
                                                } else {
                                                                : $paramSettings[self::PARAM_MAX];
                                                        $this->getResult()->addParsedLimit( $this->getModuleName(), $value );
                                                } else {
-                                                       $value = intval( $value );
+                                                       $value = (int)$value;
                                                        $this->validateLimit(
                                                                $paramName,
                                                                $value,
                                                        $this->validateLimit(
                                                                $paramName,
                                                                $value,