Use (int) rather than intval()
[lhc/web/wiklou.git] / includes / api / ApiQueryPageProps.php
index de1df34..61d8a94 100644 (file)
@@ -1,9 +1,5 @@
 <?php
 /**
- *
- *
- * Created on Aug 7, 2010
- *
  * Copyright © 2010 soxred93, Bryan Tong Minh
  *
  * This program is free software; you can redistribute it and/or modify
@@ -43,7 +39,7 @@ class ApiQueryPageProps extends ApiQueryBase {
 
                $this->params = $this->extractRequestParams();
                if ( $this->params['continue'] ) {
-                       $continueValue = intval( $this->params['continue'] );
+                       $continueValue = (int)$this->params['continue'];
                        $this->dieContinueUsageIf( strval( $continueValue ) !== $this->params['continue'] );
                        $filteredPages = [];
                        foreach ( $pages as $id => $page ) {
@@ -54,7 +50,7 @@ class ApiQueryPageProps extends ApiQueryBase {
                        $pages = $filteredPages;
                }
 
-               if ( !count( $pages ) ) {
+               if ( $pages === [] ) {
                        # Nothing to do
                        return;
                }
@@ -120,6 +116,6 @@ class ApiQueryPageProps extends ApiQueryBase {
        }
 
        public function getHelpUrls() {
-               return 'https://www.mediawiki.org/wiki/API:Pageprops';
+               return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Pageprops';
        }
 }