From 8d6cc4f2b63c3f0dc31fe6cecd34ac023ea1cccb Mon Sep 17 00:00:00 2001 From: xXx-caillou-xXx Date: Wed, 20 Dec 2017 18:05:54 +0100 Subject: Improve the previous commit We can simply use the return value of the original `setcookie` :>--- src/sp_cookie_encryption.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/sp_cookie_encryption.c') diff --git a/src/sp_cookie_encryption.c b/src/sp_cookie_encryption.c index 0e279ed..b7050da 100644 --- a/src/sp_cookie_encryption.c +++ b/src/sp_cookie_encryption.c @@ -137,7 +137,6 @@ PHP_FUNCTION(sp_setcookie) { zend_string *name = NULL, *value = NULL, *path = NULL, *domain = NULL, *samesite = NULL; zend_long expires = 0; zend_bool secure = 0, httponly = 0; - zval ret_val; const sp_cookie *cookie_node = NULL; zval func_name; char *cookie_samesite; @@ -229,7 +228,7 @@ PHP_FUNCTION(sp_setcookie) { CG(function_table), "setcookie", strlen("setcookie")); func->handler = handler; - call_user_function(CG(function_table), NULL, &func_name, &ret_val, 7, params); + call_user_function(CG(function_table), NULL, &func_name, return_value, 7, params); func->handler = PHP_FN(sp_setcookie); RETURN_TRUE; -- cgit v1.3