From 916709cf8514e34a39426c6f127bb34096515324 Mon Sep 17 00:00:00 2001 From: Reeze Xia Date: Tue, 3 Mar 2015 19:13:51 +0800 Subject: [PATCH] Return void like other functions --- ext/standard/basic_functions.c | 8 ++------ .../tests/general_functions/error_clear_last.phpt | 9 ++++----- 2 files changed, 6 insertions(+), 11 deletions(-) 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 -- 2.40.0