You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
private function checkDevicesTokens()
{
$devices = $this->getDevices();
$adapter = $this->getAdapter();
foreach ($devices as $device) {
if (false === $adapter->supports($device->getToken())) {
throw new AdapterException(
sprintf(
'Adapter %s does not support %s token\'s device',
(string) $adapter,
$device->getToken()
)
);
}
}
}
instead of throwing a new exception. Is there a way to just remove the token from the iterator object? And then the script would not die and just cleanse / purge the token list.
The text was updated successfully, but these errors were encountered:
This function is not supposed to have a heavy overhead (regarding to the original purpose that it have been developed for).
Therefore, I suggest to add an API-function (preferably public function inside the class) that does similar loop to this one, except it must have a flag-check (boolean for "either skip or force to send the push after encountering error") and then do the logic and [if necessary] logging after the original loop-logic.
When the class calls this function
instead of throwing a new exception. Is there a way to just remove the token from the iterator object? And then the script would not die and just cleanse / purge the token list.
The text was updated successfully, but these errors were encountered: