bugsnag / bugsnag-php

BugSnag error monitoring and crash reporting tool for PHP apps
https://docs.bugsnag.com/platforms/php
MIT License
554 stars 77 forks source link

Fix session throttling when storage backend doesn't store integers #643

Closed imjoehaines closed 2 years ago

imjoehaines commented 2 years ago

Goal

We currently require an integer to be returned by the session storage backend when storing the last time we sent sessions. This allows us to throttle the delivery of session data to once every 30 seconds. However, some storage backends convert all values to strings, which breaks this check and causes a session to be sent on every request

This PR loosens the check to allow any numeric value instead of specifically an integer