View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0001065 | v3.0 Release | [All Projects] General | public | 2012-02-19 05:18 | 2013-08-28 11:19 | ||||
Reporter | robertbasic | ||||||||
Assigned To | caseydk | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | 3.0.0 | |||||||
Summary | 0001065: Deleting contacts | ||||||||
Description | When 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 Information | First seen here: https://github.com/caseysoftware/web2project/blob/master/modules/contacts/addedit.php#L32 Used: https://github.com/caseysoftware/web2project/blob/master/modules/contacts/addedit.php#L51 and https://github.com/caseysoftware/web2project/blob/master/modules/contacts/addedit.php#L62 | ||||||||
Tags | No tags attached. | ||||||||
Attached Files |
|
![]() |
|
robertbasic (developer) 2012-02-19 05:23 |
Similary, $this->user_id on this line [1] does not exist. [1] https://github.com/caseysoftware/web2project/blob/master/modules/contacts/contacts.class.php#L231 |
Korkonius (reporter) 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) |
caseydk (administrator) 2012-05-27 21:00 |
Resolved differently than the original pull request, but it works out nicely: https://github.com/caseysoftware/web2project/pull/99 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2012-02-19 05:18 | robertbasic | New Issue | |
2012-02-19 05:23 | robertbasic | Note Added: 0002406 | |
2012-04-21 14:06 | Korkonius | Note Added: 0002493 | |
2012-05-27 21:00 | caseydk | Note Added: 0002537 | |
2012-05-27 21:00 | caseydk | Status | new => resolved |
2012-05-27 21:00 | caseydk | Resolution | open => fixed |
2012-05-27 21:00 | caseydk | Assigned To | => caseydk |
2013-08-28 11:14 | caseydk | Fixed in Version | => 3.0.0 |
2013-08-28 11:19 | caseydk | Status | resolved => closed |