Skip to content
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

Handle encrypted columns which are set to null #19

Merged
merged 2 commits into from
Apr 7, 2024

Conversation

22Nick22
Copy link
Contributor

@22Nick22 22Nick22 commented Apr 7, 2024

The PR solves an issue whereby if an encrypted virtual column is set to null a TypeError is thrown when accessing it:

local.ERROR: Stancl\Tenancy\Database\Models\Tenant::valueEncrypted(): Argument #1 ($value) must be of type string, null given, called in /var/www/html/vendor/stancl/virtualcolumn/src/VirtualColumn.php on line 48

@stancl
Copy link
Member

stancl commented Apr 7, 2024

Pulled this and tried undoing the change to see if the test fails — indeed it throws the exception you reported, so the change makes sense here.

Thanks for the fix + regression test!

@stancl stancl merged commit 65f9000 into archtechx:master Apr 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants