-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in >=4.3.0 when setPermitEmpty option is used. #93
Comments
Check v4.5.0 which fixed this error. |
I had read that version 4.5.0 addressed this issue, however it was still present when targeting that specific version. When digging deeper, it appears that the issue was ultimately coming from a framework specific behavior that changed the incoming fields in the encrypted row, which was then triggering this error. Thanks for following up. |
I too can confirm that this is still an issue in 4.5.0 According to php docs: |
This is a red herring. ciphersweet/src/EncryptedRow.php Lines 613 to 631 in 575dda1
Look again: ciphersweet/src/EncryptedRow.php Lines 613 to 618 in 575dda1
You need to declare your types optional. This is a new feature. See #92 |
I've released |
Version 4.3.0 introduced some new logic using the
is_scalar
method. It appears the new logic is meant to enforce some constraints on the value. Unfortunately, when thesetPermitEmpty
functionality it is possible for the value of$row[$field]
to be null. Becauseis_scalar(null)
evaluates to false, this new logic is being engaged when perhaps it shouldn't be.ciphersweet/src/EncryptedRow.php
Lines 532 to 534 in ccb2e1d
Perhaps this was an oversight?
The text was updated successfully, but these errors were encountered: