Skip to content

Commit e4ce1cb

Browse files
Fix ID check if none is given
1 parent 889ff4b commit e4ce1cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __construct(API $api) {
6262
*/
6363
protected function requireSuccessFor(array $result): int {
6464
$idExists = array_key_exists('id', $result) || array_key_exists('entry', $result);
65-
$idIsNumeric = is_numeric($result['id'] ?? 0) || is_numeric($result['entry'] ?? 0);
65+
$idIsNumeric = is_numeric($result['id'] ?? $result['entry'] ?? null);
6666
$isSuccess = array_key_exists('success', $result) && $result['success'] === true;
6767

6868
if (!$idExists || !$idIsNumeric || !$isSuccess) {

0 commit comments

Comments
 (0)