]> granicus.if.org Git - php/commitdiff
Fix incorrect zend_bool usage for display_errors
authorGeorge Peter Banyard <girgias@php.net>
Mon, 8 Jun 2020 13:05:58 +0000 (15:05 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Tue, 9 Jun 2020 09:43:37 +0000 (11:43 +0200)
main/main.c
main/php_globals.h

index 119fbb26dfda3d2ab63ce3acac30a5fa2d9d224b..ae6b539ba2588f650dfd8e2ada28bfd0740a6e57 100644 (file)
@@ -447,9 +447,9 @@ static PHP_INI_MH(OnUpdateTimeout)
 
 /* {{{ php_get_display_errors_mode() helper function
  */
-static int php_get_display_errors_mode(char *value, size_t value_length)
+static zend_uchar php_get_display_errors_mode(char *value, size_t value_length)
 {
-       int mode;
+       zend_uchar mode;
 
        if (!value) {
                return PHP_DISPLAY_ERRORS_STDOUT;
@@ -480,7 +480,7 @@ static int php_get_display_errors_mode(char *value, size_t value_length)
  */
 static PHP_INI_MH(OnUpdateDisplayErrors)
 {
-       PG(display_errors) = (zend_bool) php_get_display_errors_mode(ZSTR_VAL(new_value), ZSTR_LEN(new_value));
+       PG(display_errors) = php_get_display_errors_mode(ZSTR_VAL(new_value), ZSTR_LEN(new_value));
 
        return SUCCESS;
 }
@@ -490,7 +490,8 @@ static PHP_INI_MH(OnUpdateDisplayErrors)
  */
 static PHP_INI_DISP(display_errors_mode)
 {
-       int mode, cgi_or_cli;
+       zend_uchar mode;
+       bool cgi_or_cli;
        size_t tmp_value_length;
        char *tmp_value;
 
index 3f34aac951d6c4af98c4c784421f8ea32cbfb0e1..42337e5b9bd10dffdc996eda47844ddfd8811bba 100644 (file)
@@ -65,7 +65,7 @@ struct _php_core_globals {
        zend_long memory_limit;
        zend_long max_input_time;
 
-       zend_bool display_errors;
+       zend_uchar display_errors;
        zend_bool display_startup_errors;
        zend_bool log_errors;
        zend_long      log_errors_max_len;