Commit eb6c4d10 authored by Freddy's avatar Freddy
Browse files

Merge branch 'fix-editcount' into 'master'

Use better handling

See merge request Cygnus/Cygnus!20
parents e6115878 01d8fbee
......@@ -596,7 +596,7 @@ class Core extends Password {
public function getUserEditcount ($username) {
$result = $this->httpRequest('action=query&format=json&list=users&usprop=editcount&ususers=' . urlencode($username), $this->job, 'GET');
if (strpos($result, "missing") !== false)
if (isset($result['query']['users'][0]['missing']))
return false;
$result = json_decode($result, true);
return $result['query']['users'][0]['editcount'];
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment