From: Reeze Xia Date: Tue, 3 Mar 2015 11:13:51 +0000 (+0800) Subject: Return void like other functions X-Git-Tag: PRE_PHP7_NSAPI_REMOVAL~755^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=916709cf8514e34a39426c6f127bb34096515324;p=php Return void like other functions --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 87c3425152..2ea1384500 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4704,8 +4704,8 @@ PHP_FUNCTION(error_get_last) } /* }}} */ -/* {{{ proto bool error_clear_last() - Clear the last occurred error. Returns false if there hasn't been an error yet. */ +/* {{{ proto void error_clear_last(void) + Clear the last occurred error. */ PHP_FUNCTION(error_clear_last) { if (zend_parse_parameters_none() == FAILURE) { @@ -4723,11 +4723,7 @@ PHP_FUNCTION(error_clear_last) free(PG(last_error_file)); PG(last_error_file) = NULL; } - - RETURN_TRUE; } - - RETURN_FALSE; } /* }}} */ diff --git a/ext/standard/tests/general_functions/error_clear_last.phpt b/ext/standard/tests/general_functions/error_clear_last.phpt index b6039d8f16..02936c84cb 100644 --- a/ext/standard/tests/general_functions/error_clear_last.phpt +++ b/ext/standard/tests/general_functions/error_clear_last.phpt @@ -4,20 +4,20 @@ error_clear_last() tests --EXPECTF-- NULL -bool(false) +NULL array(4) { ["type"]=> int(8) @@ -28,6 +28,5 @@ array(4) { ["line"]=> int(%d) } -bool(true) NULL Done