Ticket #774 (closed defect: fixed)

Opened 17 months ago

Last modified 17 months ago

[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

Changed 17 months ago by jwage

  • status changed from new to closed
  • resolution set to fixed

(In [3885]) fixes #774

Note: See TracTickets for help on using tickets.