diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/com_dotnet/com_handlers.c | 7 | ||||
-rw-r--r-- | ext/com_dotnet/tests/bug78650.phpt | 27 |
2 files changed, 33 insertions, 1 deletions
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index c9b7d898ed..1036abb977 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -172,6 +172,11 @@ static void com_write_dimension(zend_object *object, zval *offset, zval *value) } } +static zval *com_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) +{ + return NULL; +} + static int com_property_exists(zend_object *object, zend_string *member, int check_empty, void **cache_slot) { DISPID dispid; @@ -531,7 +536,7 @@ zend_object_handlers php_com_object_handlers = { com_property_write, com_read_dimension, com_write_dimension, - NULL, + com_get_property_ptr_ptr, com_property_exists, com_property_delete, com_dimension_exists, diff --git a/ext/com_dotnet/tests/bug78650.phpt b/ext/com_dotnet/tests/bug78650.phpt new file mode 100644 index 0000000000..c362de95bb --- /dev/null +++ b/ext/com_dotnet/tests/bug78650.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #78650 (new COM Crash) +--SKIPIF-- +<?php +if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available'); +?> +--FILE-- +<?php +$fname = __DIR__ . '/bug78650/foo/bar'; +mkdir($fname, 0777, true); + +$fso = new COM("Scripting.FileSystemObject"); +$folder = $fso->GetFolder($fname); +$folder->ParentFolder->Name = 'baz'; + +print('OK'); +?> +--EXPECT-- +OK +--CLEAN-- +<?php +rmdir(__DIR__ . '/bug78650/baz/bar'); +rmdir(__DIR__ . '/bug78650/foo/bar'); +rmdir(__DIR__ . '/bug78650/baz'); +rmdir(__DIR__ . '/bug78650/foo'); +rmdir(__DIR__ . '/bug78650'); +?> |