Closed Bug 3137 Opened 26 years ago Closed 26 years ago

addValue or setValue after removeValue breaks

Categories

(Directory :: PerLDAP, defect, P2)

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 2853

People

(Reporter: bl, Assigned: leif)

Details

When removeValue has removed the last value of an attribute, then either addValue or setValue is used, the new values don't get applied. The following patch appears to fix the problem: --- Entry.pm.bak Thu Jan 21 15:52:42 1999 +++ Entry.pm Fri Feb 12 09:47:08 1999 @@ -381,6 +381,10 @@ $self->{"_oc_numattr_"}++; } + # If this attribute was set as 'deleted', it should no longer be + delete $self->{"_self_obj_"}->{"_${attr}_deleted_"} + if ( $self->{"_self_obj_"}->{"_${attr}_deleted_"} == 1 ); + return 1; } @@ -416,6 +420,11 @@ return 0 unless (defined($attr) && ($attr ne "")); $self->{$attr} = [@vals]; + + # If this attribute was set as 'deleted', it should no longer be + delete $self->{"_self_obj_"}->{"_${attr}_deleted_"} + if ( $self->{"_self_obj_"}->{"_${attr}_deleted_"} == 1 ); + return 1; }
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
*** This bug has been marked as a duplicate of 2853 ***
Status: RESOLVED → VERIFIED
Verified Dup of Bug 2853
You need to log in before you can comment on or make changes to this bug.