Skip to content

Commit db01dbc

Browse files
committed
ext/session: Initialize variable with default value
To make it easier for IDEs to understand what is going on
1 parent 766ccc2 commit db01dbc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ext/session/session.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ static void php_session_save_current_state(int write)
513513
if (write) {
514514
IF_SESSION_VARS() {
515515
zend_string *handler_class_name = PS(mod_user_class_name);
516-
const char *handler_function_name;
516+
const char *handler_function_name = "write";
517517

518518
if (PS(mod_data) || PS(mod_user_implemented)) {
519519
zend_string *val;
@@ -529,12 +529,10 @@ static void php_session_save_current_state(int write)
529529
handler_function_name = handler_class_name != NULL ? "updateTimestamp" : "update_timestamp";
530530
} else {
531531
ret = PS(mod)->s_write(&PS(mod_data), PS(id), val, PS(gc_maxlifetime));
532-
handler_function_name = "write";
533532
}
534533
zend_string_release_ex(val, 0);
535534
} else {
536535
ret = PS(mod)->s_write(&PS(mod_data), PS(id), ZSTR_EMPTY_ALLOC(), PS(gc_maxlifetime));
537-
handler_function_name = "write";
538536
}
539537
}
540538

0 commit comments

Comments
 (0)