Skip to content

Commit f06f84b

Browse files
committed
have parsePerms return a consistent array
so you can use something like $gplay->parsePerms($pkg)['grouped']; without risking PHP notices when no data was retrieved
1 parent cee47f7 commit f06f84b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

google-play.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ public function parsePerms($packageName, $lang='en') {
198198
case "400" : // echo "! No XHR for '$pkg'\n";
199199
case "404" : // app no longer on play
200200
default:
201-
return ['success'=>0, 'message'=>$http_response_header[0]];
201+
return ['success'=>0, 'grouped'=>[], 'perms'=>[], 'message'=>$http_response_header[0]];
202202
break;
203203
}
204204
} else { // network error (e.g. "failed to open stream: Connection timed out")
205-
return ['success'=>0, 'message'=>'network error'];
205+
return ['success'=>0, 'grouped'=>[], 'perms'=>[], 'message'=>'network error'];
206206
}
207207

208208
$perms = $perms_unique = [];

0 commit comments

Comments
 (0)