Use (int) rather than intval()
[lhc/web/wiklou.git] / includes / api / ApiQueryBacklinks.php
index f4e7463..f82a559 100644 (file)
@@ -187,7 +187,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                        }
 
                        if ( is_null( $resultPageSet ) ) {
-                               $a = [ 'pageid' => intval( $row->page_id ) ];
+                               $a = [ 'pageid' => (int)$row->page_id ];
                                ApiQueryBase::addTitleInfo( $a, $t );
                                if ( $row->page_is_redirect ) {
                                        $a['redirect'] = true;
@@ -306,7 +306,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                        }
 
                        if ( is_null( $resultPageSet ) ) {
-                               $a['pageid'] = intval( $row->page_id );
+                               $a['pageid'] = (int)$row->page_id;
                                ApiQueryBase::addTitleInfo( $a, Title::makeTitle( $row->page_namespace, $row->page_title ) );
                                if ( $row->page_is_redirect ) {
                                        $a['redirect'] = true;
@@ -336,7 +336,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                        $this->params['limit'] = $this->getMain()->canApiHighLimits() ? $botMax : $userMax;
                        $result->addParsedLimit( $this->getModuleName(), $this->params['limit'] );
                } else {
-                       $this->params['limit'] = intval( $this->params['limit'] );
+                       $this->params['limit'] = (int)$this->params['limit'];
                        $this->validateLimit( 'limit', $this->params['limit'], 1, $userMax, $botMax );
                }