onMissingMethod is not firing if the execution of the method is from within the class

Description

onMissingMethod is not firing if the execution of the method is from within the class.

This has been a constant pain in CFML where the onMissingMethod only fires if you call it using this.methodName

Allow for the trigger to exist within and outside.

Activity

Show:

Brad Wood September 10, 2024 at 8:36 AM

This should be working for

variables.doesNotExist()

as well as

doesNotExist()

inside of a class. The latter was more complicated as headless function calls use a totally different code path.

Brad Wood September 9, 2024 at 7:32 PM

Yes, the logic for on missing method is implemented in the outer class when a method call comes externally. When you call a method from inside a class, it hits the variables scope directly which does not have this check. I should be able to duplicate that check, but will need to see if it causes any CF compat. I don’t THINK so, as it would only affect cases which would currently throw an exception in CF, but now would hit OMM.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created September 9, 2024 at 5:23 PM
Updated September 10, 2024 at 8:36 AM
Resolved September 10, 2024 at 8:36 AM

Flag notifications