MantisBT - v3.0 Release
View Issue Details
0001065v3.0 Release[All Projects] Generalpublic2012-02-19 05:182013-08-28 11:19
Assigned Tocaseydk 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.0.0 
Summary0001065: Deleting contacts
DescriptionWhen editing a contact, the permission for deleting that contact relies on an uninitialized variable "$msg". Need to figure out what sane default it has to have.
Additional InformationFirst seen here:

Used: and
TagsNo tags attached.
Attached Files

2012-02-19 05:23   
Similary, $this->user_id on this line [1] does not exist.

2012-04-21 14:06   
I've done some digging on this to see if it was an easy fix and I can not for the life of me find out where $msg originates...

The closest thing i (my IDE) found was in do_updatecontact.php although i don't feel like it makes any sense. Also the variable is passed on to w2p_Core_BaseObject as a reference. According to method signature and documentation.

In the CContact implementation the signature is:
public function canDelete($msg = '', $oid = null, $joins = null)

Its a bit late here, but doesn't this mean that the value it contains when calling the method doesn't matter since the variable is intended to be used as a return value?

Possibly a related bug that CContact::canDelete does not have the same signature as it's ancestor(?):
public function canDelete(&$msg = '', $oid = null, $joins = null)
2012-05-27 21:00   
Resolved differently than the original pull request, but it works out nicely:

Issue History
2012-02-19 05:18robertbasicNew Issue
2012-02-19 05:23robertbasicNote Added: 0002406
2012-04-21 14:06KorkoniusNote Added: 0002493
2012-05-27 21:00caseydkNote Added: 0002537
2012-05-27 21:00caseydkStatusnew => resolved
2012-05-27 21:00caseydkResolutionopen => fixed
2012-05-27 21:00caseydkAssigned To => caseydk
2013-08-28 11:14caseydkFixed in Version => 3.0.0
2013-08-28 11:19caseydkStatusresolved => closed