Skip to content

Typo hasRigh() instead of hasRight() in updateCard() #80

Description

@Bagu

Summary

class/CardDAVDolibarr.php line 1714 calls $this->user->hasRigh('adherent','creer')
the trailing t is missing. User::hasRigh() does not exist, so PHP raises a fatal error (Call to undefined method).

Location

File: class/CardDAVDolibarr.php Line: 1714
Function: updateCard($addressbookId, $cardUri, $cardData) (starts line 1645)

Current code

phpif(CDAV_MEMBER_SYNC>0 && intval($addressbookId)>=(2*CDAV_ADDRESSBOOK_ID_SHIFT) && intval($addressbookId)<(3*CDAV_ADDRESSBOOK_ID_SHIFT) && $this->user->hasRigh('adherent','creer'))

Proposed fix

phpif(CDAV_MEMBER_SYNC>0 && intval($addressbookId)>=(2*CDAV_ADDRESSBOOK_ID_SHIFT) && intval($addressbookId)<(3*CDAV_ADDRESSBOOK_ID_SHIFT) && $this->user->hasRight('adherent','creer'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions