diff options
author | George Peter Banyard <girgias@php.net> | 2020-09-16 02:03:46 +0200 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2020-09-21 14:32:00 +0100 |
commit | e55f0c796c05bf3e52b77902a61b34f2241609af (patch) | |
tree | ee50635e01bc5e1a6da96a5a0dfb45713edb26ea /ext/com_dotnet/com_variant.c | |
parent | 213b6667817b887e29f7fdf3a046c37c4462f756 (diff) | |
download | php-git-e55f0c796c05bf3e52b77902a61b34f2241609af.tar.gz |
Promote warnings to Error in COM extension
Closes GH-6141
Diffstat (limited to 'ext/com_dotnet/com_variant.c')
-rw-r--r-- | ext/com_dotnet/com_variant.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index 949f3ca1dd..1acae52424 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -964,8 +964,8 @@ PHP_FUNCTION(variant_date_from_timestamp) } if (timestamp < 0) { - php_error_docref(NULL, E_WARNING, "Timestamp value must be a positive value."); - RETURN_FALSE; + zend_argument_value_error(1, "must be greater than or equal to 0"); + RETURN_THROWS(); } VariantInit(&res); @@ -975,8 +975,8 @@ PHP_FUNCTION(variant_date_from_timestamp) /* Invalid after 23:59:59, December 31, 3000, UTC */ if (!tmv) { - php_error_docref(NULL, E_WARNING, "Invalid timestamp " ZEND_LONG_FMT, timestamp); - RETURN_FALSE; + zend_argument_value_error(1, "must not go past 23:59:59, December 31, 3000, UTC"); + RETURN_THROWS(); } memset(&systime, 0, sizeof(systime)); |