From ed34e7ce363c2a29cc807a840cfbe08cfa0f897f Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Fri, 16 Jan 2015 13:55:57 +0100 Subject: lambda function documentation updates --- documentation/lambda-functions.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3