optimus
optimus copied to clipboard
Foreign key ($value) NULL
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?