Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-710

DecimalType - NULL in database should be NULL not 0

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA3
    • Fix Version/s: 2.0-BETA3
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      DecimalType::convertToPHPValue should return NULL if the value in the database is NULL. This is similar to the issue with IntegerType that was fixed with #DDC-571.

      The fix would be to replace

      return (double) $value;

      with

      return is_null($value) ? null : (double) $value;

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Fixed

        Show
        Benjamin Eberlei added a comment - Fixed

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Patrick Schwisow
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: