Skip to content

Commit c14371e

Browse files
committed
Fix incorrect zend_bool usage for display_errors
1 parent 9fbc317 commit c14371e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

main/main.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,9 @@ static PHP_INI_MH(OnUpdateTimeout)
447447

448448
/* {{{ php_get_display_errors_mode() helper function
449449
*/
450-
static int php_get_display_errors_mode(char *value, size_t value_length)
450+
static zend_uchar php_get_display_errors_mode(char *value, size_t value_length)
451451
{
452-
int mode;
452+
zend_uchar mode;
453453

454454
if (!value) {
455455
return PHP_DISPLAY_ERRORS_STDOUT;
@@ -480,7 +480,7 @@ static int php_get_display_errors_mode(char *value, size_t value_length)
480480
*/
481481
static PHP_INI_MH(OnUpdateDisplayErrors)
482482
{
483-
PG(display_errors) = (zend_bool) php_get_display_errors_mode(ZSTR_VAL(new_value), ZSTR_LEN(new_value));
483+
PG(display_errors) = php_get_display_errors_mode(ZSTR_VAL(new_value), ZSTR_LEN(new_value));
484484

485485
return SUCCESS;
486486
}
@@ -490,7 +490,8 @@ static PHP_INI_MH(OnUpdateDisplayErrors)
490490
*/
491491
static PHP_INI_DISP(display_errors_mode)
492492
{
493-
int mode, cgi_or_cli;
493+
zend_uchar mode;
494+
bool cgi_or_cli;
494495
size_t tmp_value_length;
495496
char *tmp_value;
496497

main/php_globals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct _php_core_globals {
6565
zend_long memory_limit;
6666
zend_long max_input_time;
6767

68-
zend_bool display_errors;
68+
zend_uchar display_errors;
6969
zend_bool display_startup_errors;
7070
zend_bool log_errors;
7171
zend_long log_errors_max_len;

0 commit comments

Comments
 (0)