Calling own function in event function raises ERROR 500

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
mpaw
Registered User
Posts: 141
Joined: Mon Sep 16, 2019 1:09 pm

Calling own function in event function raises ERROR 500

Post by mpaw »

Hi.

I have defined event function. Inside of it I try to call my own function. But I can't. Event when I call:

Code: Select all

    function abc()
    {
    }
    
    public function event_fun($event)
    {
        abc();
    }
    
it raises ERROR 500. How to ommit it?
User avatar
Mike-on-Tour
Registered User
Posts: 462
Joined: Wed Jan 15, 2020 3:51 pm
Location: Germany
Name: Michael
Contact:

Re: Calling own function in event function raises ERROR 500

Post by Mike-on-Tour »

If you defined the function abc() inside your class you have to do it with $this->abc(), just calling abc() won't cut the mustard.
Watz fo lunch?
If you like my extensions or my support please consider a donation: Image
mpaw
Registered User
Posts: 141
Joined: Mon Sep 16, 2019 1:09 pm

Re: Calling own function in event function raises ERROR 500

Post by mpaw »

Thank you so much :)
Post Reply

Return to “Extension Writers Discussion”