fix: various small fixes (#3519)

This commit is contained in:
Dag 2023-07-09 10:08:30 +02:00 committed by GitHub
parent f0a504bb9a
commit dfe78fb379
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 14 deletions

View file

@ -23,7 +23,10 @@ class CuriousCatBridge extends BridgeAbstract
$apiJson = getContents($url);
$apiData = json_decode($apiJson, true);
$apiData = Json::decode($apiJson);
if (isset($apiData['error'])) {
throw new \Exception($apiData['error_code']);
}
foreach ($apiData['posts'] as $post) {
$item = [];