immobiliare / ApnsPHP

ApnsPHP: Apple Push Notification & Feedback Provider
BSD 3-Clause "New" or "Revised" License
1.43k stars 454 forks source link

Skip autoloading instead of throwing exceptions #152

Open glorpen opened 7 years ago

glorpen commented 7 years ago

My use case is starting with Twig, somehow when checking for __toString method the autoload mechanism is triggered even on simple values, and then checking for "0" raises Exception - as it is empty()'ish. I think that autoload should not throw exceptions if class is simply not found, changing it to simple returns should prevent surprises for devs.