Doctrine 1
  1. Doctrine 1
  2. DC-212

Doctrine_Node_NestedSet::hasParent() returns true on non-leaf objects.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.0-BETA1
    • Fix Version/s: 1.2.0-BETA3
    • Component/s: Nested Set
    • Labels:
      None

      Description

      The code for Doctrine_Node_NestedSet::hasParent() will return true if a Doctrine_Record is not yet a valid node. The code for hasParent() returns the inverse of Doctrine_Node_NestedSet::isRoot() which returns false for both non-root nodes and non-valid nodes. I believe a call to Doctrine_Node_NestedSet::isValidNode() should be included in this function to prevent this issue.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            PhazeonPhoenix
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: