diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-09-25 10:18:12 +0200 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-09-25 12:08:15 +0200 |
commit | 41b096b392e551df51c80d29f6f30c163a0630ea (patch) | |
tree | ea1eda0afdce34542d9305ae9d8ff39363d1af5f /ext/date/php_date.c | |
parent | 166178ae6db297e8168cbef0afc281fd1a49e93c (diff) | |
download | php-git-41b096b392e551df51c80d29f6f30c163a0630ea.tar.gz |
Promote a few forgotten warnings to exceptions
Closes GH-6211
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r-- | ext/date/php_date.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 88431a22ea..8c0f5a62b1 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -4501,8 +4501,8 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su retformat != SUNFUNCS_RET_STRING && retformat != SUNFUNCS_RET_DOUBLE) { - php_error_docref(NULL, E_WARNING, "Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE"); - RETURN_FALSE; + zend_argument_value_error(2, "must be one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, or SUNFUNCS_RET_DOUBLE"); + RETURN_THROWS(); } altitude = 90 - zenith; |