diff options
| author | xXx-caillou-xXx | 2017-12-20 16:08:18 +0100 |
|---|---|---|
| committer | jvoisin | 2017-12-20 16:08:18 +0100 |
| commit | a1675cd79b0df2478026573b0fac52464ef3c1b7 (patch) | |
| tree | c40520065b0a7c4c9b9e8fb22250d5b8cbc30c39 /src/sp_cookie_encryption.c | |
| parent | f7dfc937ebc7317fd3ff168e062d32119913d7ae (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.c | 1 |
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 | ||
| 237 | int hook_cookies() { | 238 | int hook_cookies() { |
