Skip to content

Commit f790ef7

Browse files
authored
Fix usage of invalid named member function (#33)
The usage of `.length()` as a member function on an array fails in Lucee 5.3.10. I'm surprised this worked previously.
1 parent d3fc542 commit f790ef7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

models/Mail.cfc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ component accessors="true" {
203203
throw(
204204
type : "InvalidMailException",
205205
message: "One or more required fields are missing.",
206-
detail : "Please check the basic mail fields of To, From, Subject and Body as they are empty. To: #variables.config.to#, From: #variables.config.from#, Subject Len = #variables.config.subject.length()#, Body Len = #variables.config.body.length()#."
206+
detail : "Please check the basic mail fields of To, From, Subject and Body as they are empty. To: #variables.config.to#, From: #variables.config.from#, Subject Len = #variables.config.subject.len()#, Body Len = #variables.config.body.len()#."
207207
);
208208
}
209209
return this;
@@ -214,10 +214,10 @@ component accessors="true" {
214214
*/
215215
boolean function validate(){
216216
if (
217-
variables.config.from.length() eq 0 OR
218-
variables.config.to.length() eq 0 OR
219-
variables.config.subject.length() eq 0 OR
220-
( variables.config.body.length() eq 0 AND arrayLen( variables.config.mailParts ) EQ 0 )
217+
variables.config.from.len() eq 0 OR
218+
variables.config.to.len() eq 0 OR
219+
variables.config.subject.len() eq 0 OR
220+
( variables.config.body.len() eq 0 AND arrayLen( variables.config.mailParts ) EQ 0 )
221221
) {
222222
return false;
223223
} else {

0 commit comments

Comments
 (0)