-
-
Notifications
You must be signed in to change notification settings - Fork 8
Not working if enbaled full null support. #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working if enbaled full null support. #38
Conversation
barvaliyarajnil
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not working if enbaled full null support
| param arguments.dateMask = thisMemento.dateMask; | ||
| param arguments.timeMask = thisMemento.timeMask; | ||
| param arguments.autoCastBooleans = thisMemento.autoCastBooleans; | ||
| if(isNull(arguments.trustedGetters)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the param is not respecting full null support?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you use param inside a function, I mean generally we use param for form and URL data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
param is a generic language construct that tests for a parameter's existence, tests its data type, and, if
a default value is not assigned, optionally provides one. A parameter can be any valid scope variable. Thus, it can be used not only for the form/url scopes, but for any scope. That's why it should test If the paramed variable is null and assign it the default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we enable full null support and pass any one argument then remain argument is initiated with a null value and not set a default value, Because we define it in function, the param works fine for undefined variables/arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please let me know how I can reproduce this please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reproduction first enabled full null support in an application using this.nullSupport = true;
Then just call getMemento for any object with ignoreDefaults: true
i.e. userBean.getMemento( includes: "name", excludes:"id",ignoreDefaults: true);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What CFML Engine are you using?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using Lucee 5.3.9.141
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. let me go and test.
|
Sorry on the delay. Tested and verified. Had to do more tuning around this, but it's now on be. Thanks for the PR |
Description
Not working is we enabled full null support.
IMPORTANT: Please review the CONTRIBUTING.md file for detailed contributing guidelines.
Issues
All PRs must have an accompanied issue. Please make sure you created it and linked it here.
Type of change
Please delete options that are not relevant.