Some type check fixes

This commit is contained in:
Alex Cabal 2023-06-21 11:01:43 -05:00
parent d4707eb595
commit bd4b8d8944
6 changed files with 6 additions and 5 deletions

View file

@ -57,7 +57,7 @@ class NewsletterSubscription extends PropertiesBase{
', [$this->User->UserId, false, $this->IsSubscribedToNewsletter, $this->IsSubscribedToSummary, $this->Created]);
}
catch(PDOException $ex){
if($ex->errorInfo[1] == 1062){
if(($ex->errorInfo[1] ?? 0) == 1062){
// Duplicate unique key; email already in use
throw new Exceptions\NewsletterSubscriptionExistsException();
}