summaryrefslogtreecommitdiff
path: root/src/sp_cookie_encryption.c
diff options
context:
space:
mode:
authorxXx-caillou-xXx2017-12-20 16:08:18 +0100
committerjvoisin2017-12-20 16:08:18 +0100
commita1675cd79b0df2478026573b0fac52464ef3c1b7 (patch)
treec40520065b0a7c4c9b9e8fb22250d5b8cbc30c39 /src/sp_cookie_encryption.c
parentf7dfc937ebc7317fd3ff168e062d32119913d7ae (diff)
Make `setcookie` return true
We forgot to set a return value to the setcookie function, thus always returning false. Since very few frameworks/developers are checking the return value, it went unnoticed until we played with Magento, who effectively checks the return value.
Diffstat (limited to 'src/sp_cookie_encryption.c')
-rw-r--r--src/sp_cookie_encryption.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sp_cookie_encryption.c b/src/sp_cookie_encryption.c
index 2d6c938..0e279ed 100644
--- a/src/sp_cookie_encryption.c
+++ b/src/sp_cookie_encryption.c
@@ -232,6 +232,7 @@ PHP_FUNCTION(sp_setcookie) {
232 call_user_function(CG(function_table), NULL, &func_name, &ret_val, 7, params); 232 call_user_function(CG(function_table), NULL, &func_name, &ret_val, 7, params);
233 233
234 func->handler = PHP_FN(sp_setcookie); 234 func->handler = PHP_FN(sp_setcookie);
235 RETURN_TRUE;
235} 236}
236 237
237int hook_cookies() { 238int hook_cookies() {