Created
August 17, 2017 18:38
-
-
Save KalleZ/cccb9edc34f492688ddc1dbe8ceaaa22 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/main/output.c b/main/output.c | |
index 3eb6ddc..6fd1d78 100644 | |
--- a/main/output.c | |
+++ b/main/output.c | |
@@ -1514,17 +1514,21 @@ PHP_FUNCTION(ob_get_status) | |
} | |
/* }}} */ | |
-/* {{{ proto void ob_implicit_flush([int flag]) | |
+/* {{{ proto void ob_implicit_flush([bool flag]) | |
Turn implicit flush on/off and is equivalent to calling flush() after every output call */ | |
PHP_FUNCTION(ob_implicit_flush) | |
{ | |
- zend_long flag = 1; | |
+ zval *flag = NULL; | |
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &flag) == FAILURE) { | |
+ ZVAL_TRUE(flag); | |
+ | |
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z", &flag) == FAILURE) { | |
return; | |
} | |
- php_output_set_implicit_flush(flag); | |
+ convert_to_boolean(flag); | |
+ | |
+ php_output_set_implicit_flush(Z_TYPE_P(flag) == IS_TRUE ? 1 : 0); | |
} | |
/* }}} */ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment