summaryrefslogtreecommitdiff
path: root/ext/com_dotnet/com_handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/com_dotnet/com_handlers.c')
-rw-r--r--ext/com_dotnet/com_handlers.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c
index 66218cfae8..4278818511 100644
--- a/ext/com_dotnet/com_handlers.c
+++ b/ext/com_dotnet/com_handlers.c
@@ -123,6 +123,11 @@ static void com_write_dimension(zval *object, zval *offset, zval *value)
obj = CDNO_FETCH(object);
+ if (offset == NULL) {
+ php_com_throw_exception(DISP_E_BADINDEX, "appending to variants is not supported");
+ return;
+ }
+
if (V_VT(&obj->v) == VT_DISPATCH) {
ZVAL_COPY_VALUE(&args[0], offset);
ZVAL_COPY_VALUE(&args[1], value);