Skip to content

Commit 0b4bd6a

Browse files
committed
Address reviews
1 parent a6e2c9a commit 0b4bd6a

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

ext/com_dotnet/com_com.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -755,10 +755,10 @@ PHP_FUNCTION(com_print_typeinfo)
755755
php_com_dotnet_object *obj = NULL;
756756
ITypeInfo *typeinfo;
757757

758-
ZEND_PARSE_PARAMETERS_START(2, 3)
758+
ZEND_PARSE_PARAMETERS_START(1, 3)
759759
Z_PARAM_OBJ_OF_CLASS_OR_STR(object_zpp, php_com_variant_class_entry, typelib_name_zpp)
760760
Z_PARAM_OPTIONAL
761-
Z_PARAM_STRING(ifacename, ifacelen)
761+
Z_PARAM_STRING_OR_NULL(ifacename, ifacelen)
762762
Z_PARAM_BOOL(wantsink)
763763
ZEND_PARSE_PARAMETERS_END();
764764

ext/com_dotnet/com_extension.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function variant_cmp(mixed $left, mixed $right, int $lcid = LOCALE_SYSTEM_DEFAUL
4646

4747
function variant_date_to_timestamp(variant $variant): ?int {}
4848

49-
function variant_date_from_timestamp(int $timestamp): variant|false {}
49+
function variant_date_from_timestamp(int $timestamp): variant {}
5050

5151
function variant_get_type(variant $variant): int {}
5252

ext/com_dotnet/com_extension_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: f78e9db58131f9d67021eaea4c3d4be75cafe2ac */
2+
* Stub hash: 637bee9d71fb0d566ce38004eec8bc6f75656837 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_set, 0, 2, IS_VOID, 0)
55
ZEND_ARG_OBJ_INFO(0, variant, variant, 0)
@@ -63,7 +63,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_date_to_timestamp, 0, 1,
6363
ZEND_ARG_OBJ_INFO(0, variant, variant, 0)
6464
ZEND_END_ARG_INFO()
6565

66-
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_variant_date_from_timestamp, 0, 1, variant, MAY_BE_FALSE)
66+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_variant_date_from_timestamp, 0, 1, variant, 0)
6767
ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
6868
ZEND_END_ARG_INFO()
6969

ext/com_dotnet/com_variant.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,9 +975,8 @@ PHP_FUNCTION(variant_date_from_timestamp)
975975

976976
/* Invalid after 23:59:59, December 31, 3000, UTC */
977977
if (!tmv) {
978-
/* TODO Promote to ValueError? */
979-
php_error_docref(NULL, E_WARNING, "Invalid timestamp " ZEND_LONG_FMT, timestamp);
980-
RETURN_FALSE;
978+
zend_argument_value_error(1, "must not go past 23:59:59, December 31, 3000, UTC");
979+
RETURN_THROWS();
981980
}
982981

983982
memset(&systime, 0, sizeof(systime));

0 commit comments

Comments
 (0)