Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Foreign key ($value) NULL #31

@Perzonallica

Description

@Perzonallica

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions