Skip to content

Commit 8f2a8ac

Browse files
committed
optimize code [2]
1 parent 5df6776 commit 8f2a8ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext-src/swoole_http_cookie.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ static PHP_METHOD(swoole_http_cookie, __construct) {
351351

352352
#define PHP_METHOD_HTTP_COOKIE_WITH_STR(field) \
353353
zend_string *field; \
354-
HttpCookie *cookie = php_swoole_http_get_cookie(ZEND_THIS); \
354+
HttpCookie *cookie = php_swoole_http_get_cooke_safety(ZEND_THIS); \
355355
\
356356
ZEND_PARSE_PARAMETERS_START(1, 1) \
357357
Z_PARAM_STR(field) \
@@ -382,7 +382,7 @@ static PHP_METHOD(swoole_http_cookie, withValue) {
382382

383383
static PHP_METHOD(swoole_http_cookie, withExpires) {
384384
zend_long expires = 0;
385-
HttpCookie *cookie = php_swoole_http_get_cookie(ZEND_THIS);
385+
HttpCookie *cookie = php_swoole_http_get_cooke_safety(ZEND_THIS);
386386

387387
ZEND_PARSE_PARAMETERS_START(0, 1)
388388
Z_PARAM_OPTIONAL

0 commit comments

Comments
 (0)