Page MenuHomePhabricator

[SMWWriter] Only check correctness of add object if remove object does not exist
Closed, ResolvedPublic

Description

Author: samuel.lampa

Description:
Only check correctness of add object if remove object does not exist

in checkSubject(), the first line:
if ( !$add->equals($this->title) ) return false;
... creates errors when doing delete operations using the internal API.

This is apparently due to the fact that it is executed regardless of whether a remove object exists or not, while the correct behaviour would be to only execute it if a remove object does not exist (because when doing remove operations, you will not send a valid add object).

Solution: Move the line above into the "else" part of the if ( $remove->exists() ) just below it (see submitted patch).


Version: unspecified
Severity: critical

Attached:

Details

Reference
bz24503

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:04 PM
bzimport set Reference to bz24503.

Resolved for now as suggested (in revision 71039). Need to figure out what it means though, may lead to other bugs...