diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-07-21 00:14:48 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-07-21 00:14:48 +0000 |
commit | 633ce3039f8fb47029bb70f9c6a5220b1c841489 (patch) | |
tree | 985b4e7bd51416621ce9219772dd75a75a8c4b00 /ext/standard/sunfuncs.c | |
parent | 182e93ab6e4ea122687f94400eb4ffa862684035 (diff) | |
download | php-git-633ce3039f8fb47029bb70f9c6a5220b1c841489.tar.gz |
Abort earlier on invalid format.
Diffstat (limited to 'ext/standard/sunfuncs.c')
-rw-r--r-- | ext/standard/sunfuncs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/sunfuncs.c b/ext/standard/sunfuncs.c index 2eea641f4d..7413c2cd69 100644 --- a/ext/standard/sunfuncs.c +++ b/ext/standard/sunfuncs.c @@ -192,7 +192,10 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su } case 5: gmt_offset = php_idate('Z', time, 0) / 3600; + break; default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid format"); + RETURN_FALSE; break; } @@ -210,9 +213,6 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su case SUNFUNCS_RET_DOUBLE: RETURN_DOUBLE(ret); break; - default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid format"); - RETURN_FALSE; } } /* }}} */ |