Multiple access type modifiers are not allowed


Well-known member
Hi folks,

I'm having a clash with one of my add-ons (paid) and someone else's add-on.
Thread is here:

In my data writer, I extend DataWriter_User

class Crispin_UserMap_DataWriter_User extends XFCP_Crispin_UserMap_DataWriter_User

    public function _postSave()
        // call parent

        if (!XenForo_Application::get('options')->crispin_usermap_enable_geolocation_on_save)

The error is coming in because another add-on is doing the same thing but his _postSave method is protected. Mine is public.

At first I thought fair-enough, it's an _ method so perhaps protected is correct. However, if I specify protected then I get the error:
Multiple access type modifiers are not allowed

a) Who's correct? Me or the other add-on?
b) if other add-on then what I do too correct it and make it working in future?



Well-known member
Multiple access type modifiers are not allowed
Afaik this error occurs only if you (accidentially) state more than one access modifier such as in public private myMethod()

The _postSave() method in the XF core is declared as protected. So you should also use this modifier for your method..


Well-known member
yup, I was being silly. Apologies - I should have updated the thread.

I did have it as public by mistake. The give-away should have been the method starting with an underscore.

When I fixed that I got the "multiple access type" error because one of the methods being called was public.

All in all - it was a PEBCAK error :)