optimus icon indicating copy to clipboard operation
optimus copied to clipboard

Foreign key ($value) NULL

Open Perzonallica opened this issue 6 years ago • 0 comments

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?

Perzonallica avatar Jul 29 '17 17:07 Perzonallica