summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ejs/ejsParser.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/lib/ejs/ejsParser.c b/source4/lib/ejs/ejsParser.c
index a5c40e593d..772ed574c5 100644
--- a/source4/lib/ejs/ejsParser.c
+++ b/source4/lib/ejs/ejsParser.c
@@ -1280,10 +1280,6 @@ static int parseId(Ejs *ep, int state, int flags, char **id, char **fullName,
tid = ejsLexGetToken(ep, state);
if (tid == EJS_TOK_LPAREN) {
- if (ep->currentProperty == 0) {
- ejsError(ep, "Function name not defined \"%s\"\n", *id);
- return -1;
- }
ejsLexPutbackToken(ep, EJS_TOK_FUNCTION_NAME, ep->token);
return state;
}
@@ -1979,6 +1975,11 @@ static int evalFunction(Ejs *ep, MprVar *obj, int flags)
actualArgs = proc->args;
argValues = (MprVar**) actualArgs->handles;
+ if (prototype == NULL) {
+ ejsError(ep, "Function name not defined '%s'\n", proc->procName);
+ return -1;
+ }
+
/*
* Create a new variable stack frame. ie. new local variables.
*/