Use (int) rather than intval()
[lhc/web/wiklou.git] / includes / api / ApiQueryAllUsers.php
index 7d5f6e2..a540661 100644 (file)
@@ -94,7 +94,7 @@ class ApiQueryAllUsers extends ApiQueryBase {
                        }
 
                        // no group with the given right(s) exists, no need for a query
-                       if ( !count( $groups ) ) {
+                       if ( $groups === [] ) {
                                $this->getResult()->addIndexedTagName( [ 'query', $this->getModuleName() ], '' );
 
                                return;
@@ -281,10 +281,10 @@ class ApiQueryAllUsers extends ApiQueryBase {
                                $data['hidden'] = true;
                        }
                        if ( $fld_editcount ) {
-                               $data['editcount'] = intval( $row->user_editcount );
+                               $data['editcount'] = (int)$row->user_editcount;
                        }
                        if ( $params['activeusers'] ) {
-                               $data['recentactions'] = intval( $row->recentactions );
+                               $data['recentactions'] = (int)$row->recentactions;
                                // @todo 'recenteditcount' is set for BC, remove in 1.25
                                $data['recenteditcount'] = $data['recentactions'];
                        }