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

Foreign key ($value) NULL #31

Open
Perzonallica opened this issue Jul 29, 2017 · 0 comments
Open

Foreign key ($value) NULL #31

Perzonallica opened this issue Jul 29, 2017 · 0 comments

Comments

@Perzonallica
Copy link

Hello,

I have a table "Ratings" which has a foreign key article_id INT(10) UNSIGNED NULL.

Because the FK can be NULL, I always get an invalid argument exception: Argument should be an integer.

I saw that in Optimus.php in encode/decore function you are checking if the value is numeric or not.
I'm new to PHP so I'm just asking why not to check if the foreign key is for example null? Is this a bug, or I'm doing something wrong and a FK shouldn't be NULL?

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

No branches or pull requests

1 participant