Ticket #774 (closed defect: fixed)
[PATCH] NULL cannot be stored in fields of type 'object'
| Reported by: | bschussek | Owned by: | zYne- |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.0.0 (OLD) |
| Component: | Query/Hydration | Version: | |
| Severity: | Keywords: | ||
| Cc: | bschussek | Has Test: | |
| Status: | Has Patch: |
Description
When a record has a field of type 'object', you can store NULL in it, but once the record is fetched from the database, unserialize will fail (because operating on an empty string) and cause an exception.
The patch for this is quite simple: Change line 1499 in Doctrine_Table from
$value = unserialize($value);
to
$value = empty($value) ? null : unserialize($value);
Change History
Note: See
TracTickets for help on using
tickets.