com php-src: Return void like other functions: ext/standard/bas ic_functions.c ext/standard/tests/general_functions/err or_clear_last.phpt

From: Date: Tue, 03 Mar 2015 11:13:51 +0000
Subject: com php-src: Return void like other functions: ext/standard/bas ic_functions.c ext/standard/tests/general_functions/err or_clear_last.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-85366@lists.php.net to get a copy of this message
Commit: 916709cf8514e34a39426c6f127bb34096515324 Author: Reeze Xia <reeze@php.net> Tue, 3 Mar 2015 19:13:51 +0800 Parents: c6cebca1e3d12a9857004cfd2997520929912716 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=916709cf8514e34a39426c6f127bb34096515324 Log: Return void like other functions Changed paths: M ext/standard/basic_functions.c M ext/standard/tests/general_functions/error_clear_last.phpt Diff: diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 87c3425..2ea1384 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 b6039d8..02936c8 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 <?php var_dump(error_get_last()); - -var_dump(error_clear_last()); +error_clear_last(); +var_dump(error_get_last()); @$a = $b; var_dump(error_get_last()); -var_dump(error_clear_last()); +error_clear_last(); var_dump(error_get_last()); echo "Done\n"; ?> --EXPECTF-- NULL -bool(false) +NULL array(4) { ["type"]=> int(8) @@ -28,6 +28,5 @@ array(4) { ["line"]=> int(%d) } -bool(true) NULL Done

« previous php.cvs (#85366) next »