summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReeze Xia <reeze@php.net>2015-03-03 19:13:51 +0800
committerReeze Xia <reeze@php.net>2015-03-03 19:13:51 +0800
commit916709cf8514e34a39426c6f127bb34096515324 (patch)
treef4b363e4f8bc0fd7b665820f451a38ef24fde176
parentc6cebca1e3d12a9857004cfd2997520929912716 (diff)
downloadphp-git-916709cf8514e34a39426c6f127bb34096515324.tar.gz
Return void like other functions
-rw-r--r--ext/standard/basic_functions.c8
-rw-r--r--ext/standard/tests/general_functions/error_clear_last.phpt9
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
<?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