summaryrefslogtreecommitdiff
path: root/ext/standard/basic_functions.c
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2019-12-29 20:54:57 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2019-12-30 17:38:10 +0100
commit31cf9a7ea99e69ed2838ab0765a1aefd6609ef7b (patch)
tree3fd516912d51606d822ec38e3949584d6dd6bc4e /ext/standard/basic_functions.c
parentd21ad4d955289687f2b25ff5b3b4ff314c3accdd (diff)
downloadphp-git-31cf9a7ea99e69ed2838ab0765a1aefd6609ef7b.tar.gz
Use RETURN_THROWS() when an exception is thrown
Closes GH-5036
Diffstat (limited to 'ext/standard/basic_functions.c')
-rwxr-xr-xext/standard/basic_functions.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 9d6fb12e52..2f3edb9af3 100755
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -1561,7 +1561,7 @@ PHP_FUNCTION(putenv)
if (setting_len == 0 || setting[0] == '=') {
zend_value_error("Invalid parameter syntax");
- return;
+ RETURN_THROWS();
}
pe.putenv_string = estrndup(setting, setting_len);
@@ -1942,7 +1942,7 @@ PHP_FUNCTION(sleep)
if (num < 0) {
zend_value_error("Number of seconds must be greater than or equal to 0");
- return;
+ RETURN_THROWS();
}
RETURN_LONG(php_sleep((unsigned int)num));
@@ -1962,7 +1962,7 @@ PHP_FUNCTION(usleep)
if (num < 0) {
zend_value_error("Number of microseconds must be greater than or equal to 0");
- return;
+ RETURN_THROWS();
}
if (usleep((unsigned int)num) < 0) {
#if ZEND_DEBUG
@@ -1989,11 +1989,11 @@ PHP_FUNCTION(time_nanosleep)
if (tv_sec < 0) {
zend_value_error("The seconds value must be greater than 0");
- return;
+ RETURN_THROWS();
}
if (tv_nsec < 0) {
zend_value_error("The nanoseconds value must be greater than 0");
- return;
+ RETURN_THROWS();
}
php_req.tv_sec = (time_t) tv_sec;
@@ -2007,7 +2007,7 @@ PHP_FUNCTION(time_nanosleep)
return;
} else if (errno == EINVAL) {
zend_value_error("Nanoseconds was not in the range 0 to 999 999 999 or seconds was negative");
- return;
+ RETURN_THROWS();
}
RETURN_FALSE;