-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
Our error log showed this:
Attempt to assign property "newmessage6089" on null
I'm pretty sure that the error comes from these lines:
exponent-server-sdk-php/lib/Repositories/ExpoFileDriver.php
Lines 48 to 49 in 615f04f
| // First token for this key | |
| $storageInstance->{$key} = [$value]; |
And
exponent-server-sdk-php/lib/Repositories/ExpoFileDriver.php
Lines 140 to 141 in 615f04f
| $file = file_get_contents($this->storage); | |
| return json_decode($file); |
It looks like json_decode returned null because the file wasn't a valid JSON (sadly we didn't saved the file because we were in a rush to fix the issue).
The code may check that the content is a valid JSON before returning it:
$file = file_get_contents($this->storage);
try {
return json_decode($file, null, 16, JSON_THROW_ON_ERROR);
} catch (\JsonException $e) {
return([]);
}It would start on a fresh repository, I think it's the safest option.
abpbackup
Metadata
Metadata
Assignees
Labels
No labels