Review main Abandoned

37651[BUGFIX] Fix handling of non-object values of ObjectStorageConverter

Jost Baron CR 0 V 0 Normal +140 −1 updated 12/22/16, 23:26

Commit message

Currently, the converter throws an exception if one of the converted
child properties is not an object. This exception is thrown by
sql_object_hash() in the created object storage.

This patch improves on this:
 1. If the input is NULL, it is valid input, since TypeConverters may
    return NULL to indicate a failed conversion that should be ignored
    silently. This wasn't the case, the fix is that the converter just
    ignores NULL values now.

 2. If the input is not an object and not NULL, the converter throws
    an exception itself. This exception contains more info about the
    problem than the exception from the spl_object_hash().

This also adds unit tests for the ObjectStorageConverter.

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 2