Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
dc75bb4
calendar: Use `true` / `false` instead of `1` / `0` when assigning to…
TimWolla Sep 23, 2025
b32bc35
com_dotnet: Use `true` / `false` instead of `1` / `0` when assigning …
TimWolla Sep 23, 2025
843cc54
date: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
acb5c7c
dba: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
797e8a4
dom: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
1ed8f2a
ffi: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
62701c0
ftp: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
66e3dcb
gmp: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
bc7961f
hash: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
75eec9a
iconv: Use `true` / `false` instead of `1` / `0` when assigning to `b…
TimWolla Sep 23, 2025
762624c
intl: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
1c077ac
json: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
7121dd0
ldap: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
3b30e3b
mbstring: Use `true` / `false` instead of `1` / `0` when assigning to…
TimWolla Sep 23, 2025
0fe0a32
mysqli: Use `true` / `false` instead of `1` / `0` when assigning to `…
TimWolla Sep 23, 2025
68ea653
mysqlnd: Use `true` / `false` instead of `1` / `0` when assigning to …
TimWolla Sep 23, 2025
99a88d1
odbc: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
5a0e87a
opcache: Use `true` / `false` instead of `1` / `0` when assigning to …
TimWolla Sep 23, 2025
703a047
openssl: Use `true` / `false` instead of `1` / `0` when assigning to …
TimWolla Sep 23, 2025
c5fbc7e
pcre: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
d3bbc02
pdo: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
bf3c6a8
pdo_dblib: Use `true` / `false` instead of `1` / `0` when assigning t…
TimWolla Sep 23, 2025
03c0c8c
pdo_firebird: Use `true` / `false` instead of `1` / `0` when assignin…
TimWolla Sep 23, 2025
c65bb4b
pdo_mysql: Use `true` / `false` instead of `1` / `0` when assigning t…
TimWolla Sep 23, 2025
a56cabc
pdo_pgsql: Use `true` / `false` instead of `1` / `0` when assigning t…
TimWolla Sep 23, 2025
fefb83e
phar: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
f657d6c
reflection: Use `true` / `false` instead of `1` / `0` when assigning …
TimWolla Sep 23, 2025
34bad56
session: Use `true` / `false` instead of `1` / `0` when assigning to …
TimWolla Sep 23, 2025
4bfbe64
simplexml: Use `true` / `false` instead of `1` / `0` when assigning t…
TimWolla Sep 23, 2025
078e7da
soap: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
a89c789
spl: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
fb3c4a7
sqlite3: Use `true` / `false` instead of `1` / `0` when assigning to …
TimWolla Sep 23, 2025
646c833
standard: Use `true` / `false` instead of `1` / `0` when assigning to…
TimWolla Sep 23, 2025
c29b398
sysvmsg: Use `true` / `false` instead of `1` / `0` when assigning to …
TimWolla Sep 23, 2025
e80609b
sysvsem: Use `true` / `false` instead of `1` / `0` when assigning to …
TimWolla Sep 23, 2025
22bf49e
sysvshm: Use `true` / `false` instead of `1` / `0` when assigning to …
TimWolla Sep 23, 2025
66a2fe1
xml: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
a38aac2
xmlwriter: Use `true` / `false` instead of `1` / `0` when assigning t…
TimWolla Sep 23, 2025
e537e1e
zip: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
38c93bb
zlib: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
9eb252a
Optimizer: Use `true` / `false` instead of `1` / `0` when assigning t…
TimWolla Sep 23, 2025
fc8446a
Zend: Use `true` / `false` instead of `1` / `0` when assigning to `bool`
TimWolla Sep 23, 2025
1ae731b
date: Use `return true` / `return false` for functions returning `bool`
TimWolla Sep 23, 2025
ffdf419
exif: Use `return true` / `return false` for functions returning `bool`
TimWolla Sep 23, 2025
564c22d
filter: Use `return true` / `return false` for functions returning `b…
TimWolla Sep 23, 2025
fd25dbc
ftp: Use `return true` / `return false` for functions returning `bool`
TimWolla Sep 23, 2025
3b36e8e
intl: Use `return true` / `return false` for functions returning `bool`
TimWolla Sep 23, 2025
6807bbe
mysqlnd: Use `return true` / `return false` for functions returning `…
TimWolla Sep 23, 2025
cde0c57
opcache: Use `return true` / `return false` for functions returning `…
TimWolla Sep 23, 2025
44c1cfc
openssl: Use `return true` / `return false` for functions returning `…
TimWolla Sep 23, 2025
7b45533
pcre: Use `return true` / `return false` for functions returning `bool`
TimWolla Sep 23, 2025
d881b67
pdo: Use `return true` / `return false` for functions returning `bool`
TimWolla Sep 23, 2025
1aae2f3
phar: Use `return true` / `return false` for functions returning `bool`
TimWolla Sep 23, 2025
b21e08a
session: Use `return true` / `return false` for functions returning `…
TimWolla Sep 23, 2025
ddec4a5
soap: Use `return true` / `return false` for functions returning `bool`
TimWolla Sep 23, 2025
6748025
sockets: Use `return true` / `return false` for functions returning `…
TimWolla Sep 23, 2025
21e88cb
sodium: Use `return true` / `return false` for functions returning `b…
TimWolla Sep 23, 2025
240c4ac
spl: Use `return true` / `return false` for functions returning `bool`
TimWolla Sep 23, 2025
773e83f
standard: Use `return true` / `return false` for functions returning …
TimWolla Sep 23, 2025
b47afc2
tokenizer: Use `return true` / `return false` for functions returning…
TimWolla Sep 23, 2025
5fdf833
zlib: Use `return true` / `return false` for functions returning `bool`
TimWolla Sep 23, 2025
06c393e
Optimizer: Use `return true` / `return false` for functions returning…
TimWolla Sep 23, 2025
170f0f3
Zend: Use `return true` / `return false` for functions returning `bool`
TimWolla Sep 23, 2025
aa0c66f
com_dotnet: Use `true` / `false` instead of `1` / `0` for `bool` para…
TimWolla Sep 23, 2025
d4305c8
date: Use `true` / `false` instead of `1` / `0` for `bool` parameters
TimWolla Sep 23, 2025
ab2d6df
dba: Use `true` / `false` instead of `1` / `0` for `bool` parameters
TimWolla Sep 23, 2025
7fa390e
ffi: Use `true` / `false` instead of `1` / `0` for `bool` parameters
TimWolla Sep 23, 2025
937e807
hash: Use `true` / `false` instead of `1` / `0` for `bool` parameters
TimWolla Sep 23, 2025
c8a02cc
mbstring: Use `true` / `false` instead of `1` / `0` for `bool` parame…
TimWolla Sep 23, 2025
8fde6ea
opcache: Use `true` / `false` instead of `1` / `0` for `bool` parameters
TimWolla Sep 23, 2025
86b8b6e
openssl: Use `true` / `false` instead of `1` / `0` for `bool` parameters
TimWolla Sep 23, 2025
50b6d36
pdo: Use `true` / `false` instead of `1` / `0` for `bool` parameters
TimWolla Sep 23, 2025
81e8d39
pgsql: Use `true` / `false` instead of `1` / `0` for `bool` parameters
TimWolla Sep 23, 2025
b33fd88
phar: Use `true` / `false` instead of `1` / `0` for `bool` parameters
TimWolla Sep 23, 2025
c198044
reflection: Use `true` / `false` instead of `1` / `0` for `bool` para…
TimWolla Sep 23, 2025
c4e7f0d
session: Use `true` / `false` instead of `1` / `0` for `bool` parameters
TimWolla Sep 23, 2025
8a6adce
spl: Use `true` / `false` instead of `1` / `0` for `bool` parameters
TimWolla Sep 23, 2025
4a70271
standard: Use `true` / `false` instead of `1` / `0` for `bool` parame…
TimWolla Sep 23, 2025
ef80d24
Optimizer: Use `true` / `false` instead of `1` / `0` for `bool` param…
TimWolla Sep 23, 2025
e01837f
Zend: Use `true` / `false` instead of `1` / `0` for `bool` parameters
TimWolla Sep 23, 2025
5fd13bb
openssl: Use `true` / `false` instead of `1` / `0` for `bool` paramet…
TimWolla Sep 23, 2025
d69ff81
standard: Use `true` / `false` instead of `1` / `0` for `bool` parame…
TimWolla Sep 23, 2025
c76f355
Optimizer: Use `true` / `false` instead of `1` / `0` for `bool` param…
TimWolla Sep 23, 2025
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
Prev Previous commit
Next Next commit
session: Use true / false instead of 1 / 0 when assigning to …
…`bool`

Changes done with Coccinelle:

    @@
    bool b;
    @@

    - b = 0
    + b = false

    @@
    bool b;
    @@

    - b = 1
    + b = true
  • Loading branch information
TimWolla committed Sep 23, 2025
commit 34bad56229f9b884a36a62c2f0cded3d4752101c
14 changes: 7 additions & 7 deletions ext/session/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -1635,16 +1635,16 @@ PHPAPI zend_result php_session_reset_id(void)
}

/* Apply trans sid if sid cookie is not set */
apply_trans_sid = 0;
apply_trans_sid = false;
if (APPLY_TRANS_SID) {
apply_trans_sid = 1;
apply_trans_sid = true;
if (PS(use_cookies) &&
(data = zend_hash_str_find(&EG(symbol_table), ZEND_STRL("_COOKIE")))) {
ZVAL_DEREF(data);
if (Z_TYPE_P(data) == IS_ARRAY &&
(potential_session_id = zend_hash_find(Z_ARRVAL_P(data), PS(session_name)))) {
ZVAL_DEREF(potential_session_id);
apply_trans_sid = 0;
apply_trans_sid = false;
}
}
}
Expand Down Expand Up @@ -2113,7 +2113,7 @@ PHP_FUNCTION(session_set_save_handler)
/* OOP Version */
if (ZEND_NUM_ARGS() <= 2) {
zval *obj = NULL;
bool register_shutdown = 1;
bool register_shutdown = true;

if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|b", &obj, php_session_iface_entry, &register_shutdown) == FAILURE) {
RETURN_THROWS();
Expand Down Expand Up @@ -2336,7 +2336,7 @@ PHP_FUNCTION(session_id)
/* Update the current session id with a newly generated one. If delete_old_session is set to true, remove the old session. */
PHP_FUNCTION(session_regenerate_id)
{
bool del_ses = 0;
bool del_ses = false;
zend_string *data;

if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &del_ses) == FAILURE) {
Expand Down Expand Up @@ -2535,7 +2535,7 @@ PHP_FUNCTION(session_cache_limiter)
PHP_FUNCTION(session_cache_expire)
{
zend_long expires;
bool expires_is_null = 1;
bool expires_is_null = true;

if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &expires, &expires_is_null) == FAILURE) {
RETURN_THROWS();
Expand Down Expand Up @@ -3088,7 +3088,7 @@ static void php_session_rfc1867_early_find_sid(php_session_rfc1867_progress *pro
if (PS(use_cookies)) {
sapi_module.treat_data(PARSE_COOKIE, NULL, NULL);
if (early_find_sid_in(&progress->sid, TRACK_VARS_COOKIE, progress)) {
progress->apply_trans_sid = 0;
progress->apply_trans_sid = false;
return;
}
}
Expand Down