diff options
Diffstat (limited to 'documentation')
-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 |