Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ext/session/mod_files.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ PS_READ_FUNC(files)
return SUCCESS;
}

*val = zend_string_alloc(sbuf.st_size, 0);
*val = zend_string_alloc(sbuf.st_size, false);

#ifdef HAVE_PREAD
n = pread(data->fd, ZSTR_VAL(*val), ZSTR_LEN(*val), 0);
Expand Down Expand Up @@ -519,7 +519,7 @@ PS_READ_FUNC(files)
} else {
php_error_docref(NULL, E_WARNING, "Read returned less bytes than requested");
}
zend_string_release_ex(*val, 0);
zend_string_release_ex(*val, false);
*val = ZSTR_EMPTY_ALLOC();
return FAILURE;
}
Expand Down Expand Up @@ -675,7 +675,7 @@ PS_CREATE_SID_FUNC(files)
/* Check collision */
/* FIXME: mod_data(data) should not be NULL (User handler could be NULL) */
if (data && ps_files_key_exists(data, sid) == SUCCESS) {
zend_string_release_ex(sid, 0);
zend_string_release_ex(sid, false);
sid = NULL;
if (--maxfail < 0) {
return NULL;
Expand Down
6 changes: 3 additions & 3 deletions ext/session/mod_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,15 +359,15 @@ PS_READ_FUNC(mm)
return FAILURE;
}
if (PS(use_cookies)) {
PS(send_cookie) = 1;
PS(send_cookie) = true;
}
php_session_reset_id();
PS(session_status) = php_session_active;
}

sd = ps_sd_lookup(data, PS(id), false);
if (sd) {
*val = zend_string_init(sd->data, sd->datalen, 0);
*val = zend_string_init(sd->data, sd->datalen, false);
ret = SUCCESS;
}

Expand Down Expand Up @@ -476,7 +476,7 @@ PS_CREATE_SID_FUNC(mm)
/* Check collision */
if (ps_mm_key_exists(data, sid) == SUCCESS) {
if (sid) {
zend_string_release_ex(sid, 0);
zend_string_release_ex(sid, false);
sid = NULL;
}
if (!(maxfail--)) {
Expand Down
14 changes: 7 additions & 7 deletions ext/session/mod_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ static void ps_call_handler(zval *func, int argc, zval *argv, zval *retval)
{
int i;
if (PS(in_save_handler)) {
PS(in_save_handler) = 0;
PS(in_save_handler) = false;
ZVAL_UNDEF(retval);
php_error_docref(NULL, E_WARNING, "Cannot call session save handler in a recursive manner");
return;
}
PS(in_save_handler) = 1;
PS(in_save_handler) = true;
if (call_user_function(NULL, NULL, func, retval, argc, argv) == FAILURE) {
zval_ptr_dtor(retval);
ZVAL_UNDEF(retval);
} else if (Z_ISUNDEF_P(retval)) {
ZVAL_NULL(retval);
}
PS(in_save_handler) = 0;
PS(in_save_handler) = false;
for (i = 0; i < argc; i++) {
zval_ptr_dtor(&argv[i]);
}
Expand Down Expand Up @@ -100,7 +100,7 @@ PS_OPEN_FUNC(user)
zend_bailout();
} zend_end_try();

PS(mod_user_implemented) = 1;
PS(mod_user_implemented) = true;

ret = verify_bool_return_type_userland_calls(&retval);
zval_ptr_dtor(&retval);
Expand All @@ -109,7 +109,7 @@ PS_OPEN_FUNC(user)

PS_CLOSE_FUNC(user)
{
bool bailout = 0;
bool bailout = false;
zval retval;
zend_result ret = FAILURE;

Expand All @@ -123,10 +123,10 @@ PS_CLOSE_FUNC(user)
zend_try {
ps_call_handler(&PSF(close), 0, NULL, &retval);
} zend_catch {
bailout = 1;
bailout = true;
} zend_end_try();

PS(mod_user_implemented) = 0;
PS(mod_user_implemented) = false;

if (bailout) {
if (!Z_ISUNDEF(retval)) {
Expand Down
4 changes: 2 additions & 2 deletions ext/session/mod_user_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ PHP_METHOD(SessionHandler, open)
} zend_end_try();

if (SUCCESS == ret) {
PS(mod_user_is_open) = 1;
PS(mod_user_is_open) = true;
}

RETURN_BOOL(SUCCESS == ret);
Expand All @@ -70,7 +70,7 @@ PHP_METHOD(SessionHandler, close)

PS_SANITY_CHECK_IS_OPEN;

PS(mod_user_is_open) = 0;
PS(mod_user_is_open) = false;

zend_try {
ret = PS(default_mod)->s_close(&PS(mod_data));
Expand Down
2 changes: 1 addition & 1 deletion ext/session/php_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ PHPAPI zend_result php_session_register_serializer(const char *name,
zend_result (*decode)(PS_SERIALIZER_DECODE_ARGS));

PHPAPI zend_result php_session_start(void);
PHPAPI zend_result php_session_flush(int write);
PHPAPI zend_result php_session_flush(bool write);
PHPAPI php_session_status php_get_session_status(void);

PHPAPI const ps_module *_php_find_ps_module(const char *name);
Expand Down
Loading
Loading