Use (int) rather than intval()
[lhc/web/wiklou.git] / includes / api / ApiQueryPrefixSearch.php
index 04d3f2c..e5f611f 100644 (file)
@@ -74,13 +74,13 @@ class ApiQueryPrefixSearch extends ApiQueryGeneratorBase {
                        $count = 0;
                        foreach ( $titles as $title ) {
                                $vals = [
-                                       'ns' => intval( $title->getNamespace() ),
+                                       'ns' => (int)$title->getNamespace(),
                                        'title' => $title->getPrefixedText(),
                                ];
                                if ( $title->isSpecialPage() ) {
                                        $vals['special'] = true;
                                } else {
-                                       $vals['pageid'] = intval( $title->getArticleID() );
+                                       $vals['pageid'] = (int)$title->getArticleID();
                                }
                                $fit = $result->addValue( [ 'query', $this->getModuleName() ], null, $vals );
                                ++$count;