diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-01-16 13:55:57 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-01-16 13:55:57 +0100 |
commit | ed34e7ce363c2a29cc807a840cfbe08cfa0f897f (patch) | |
tree | 306d6623f2679a8b51df294c81b7b8f93d789973 | |
parent | ed7de0678e4d027165fb79f3dabde99cb347886b (diff) |
lambda function documentation updates
-rw-r--r-- | documentation/lambda-functions.html | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/documentation/lambda-functions.html b/documentation/lambda-functions.html index 53cb5b9..4a5a8f4 100644 --- a/documentation/lambda-functions.html +++ b/documentation/lambda-functions.html @@ -56,6 +56,9 @@ other_function(function() { */ void other_function(Php::Parameters &params) { + // make sure the function was really called with at least one parameter + if (params.size() == 0) return nullptr; + // this function is called from PHP user space, and it is called // with a anonymous function as its first parameter Php::Value func = params[0]; @@ -133,7 +136,7 @@ void run_test() // create the anonymous function Php::Function multiply_by_two([](Php::Parameters &params) -> Php::Value) { - // make sure the function was really called with one parameter + // make sure the function was really called with at least one parameter if (params.size() == 0) return nullptr; // one parameter is passed to the function |