madmatt / silverstripe-encrypt-at-rest

Encrypt data at rest in your database
7 stars 11 forks source link

Cast the value to decrypt to a string to prevent type-errors #25

Closed Firesphere closed 1 year ago

Firesphere commented 1 year ago

both strlen and ctype_xdigit are now type-hardened expecting an explicit string. Passing in null will throw an error.

Thus, casting it to string to ensure it is a string, makes sure that PHP doesn't throw an error about the passed in value not being a string.

Resolvel #24

madmatt commented 1 year ago

Thanks!