DDC-571: IntegerType - NULL in datbase should be NULL not 0 #703

Closed
opened 2026-01-22 12:47:28 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (May 6, 2010).

Jira issue originally created by user drevolution:

I think that IntegerType::convertToPHPValue() should return NULL if we have NULL value in database. So insted

return (int) $value;

there will be

return is_null($value) ? NULL : (int) $value;

Or there could be even some sophisticated checking if column is nullable.

Originally created by @doctrinebot on GitHub (May 6, 2010). Jira issue originally created by user drevolution: I think that IntegerType::convertToPHPValue() should return NULL if we have NULL value in database. So insted `return (int) $value;` there will be `return is_null($value) ? NULL : (int) $value;` Or there could be even some sophisticated checking if column is nullable.
admin added the Bug label 2026-01-22 12:47:28 +01:00
admin closed this issue 2026-01-22 12:47:29 +01:00
Author
Owner

@doctrinebot commented on GitHub (May 7, 2010):

Comment created by shurakai:

I've fixed this and pushed it into http://github.com/Shurakai/doctrine2

Therefore, Roman might pull it back into the repo.

@doctrinebot commented on GitHub (May 7, 2010): Comment created by shurakai: I've fixed this and pushed it into http://github.com/Shurakai/doctrine2 Therefore, Roman might pull it back into the repo.
Author
Owner

@doctrinebot commented on GitHub (May 8, 2010):

Comment created by romanb:

@Christian: Thanks.

@doctrinebot commented on GitHub (May 8, 2010): Comment created by romanb: @Christian: Thanks.
Author
Owner

@doctrinebot commented on GitHub (May 8, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (May 8, 2010): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#703