From 633ce3039f8fb47029bb70f9c6a5220b1c841489 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 21 Jul 2004 00:14:48 +0000 Subject: Abort earlier on invalid format. --- ext/standard/sunfuncs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/standard/sunfuncs.c') 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; } } /* }}} */ -- cgit v1.2.1