We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc6f270 commit 348e9edCopy full SHA for 348e9ed
ext/com_dotnet/com_variant.c
@@ -552,14 +552,15 @@ PHP_METHOD(variant, __construct)
552
/**
553
* VT_ARRAY functionality
554
*
555
- * If already an array and VT_ARRAY is passed then:
556
- * - if only VT_ARRAY passed then do not perform a conversion
557
- * - if VT_ARRAY plus other type passed then perform conversion
+ * If already an array and VT_ARRAY is passed then perform conversion
558
*/
559
560
res = S_OK;
561
SAFEARRAYBOUND Bound;
562
+ if(vt == VT_ARRAY) //By default VT_ARRAY is VT_ARRAY | VT_VARIANT
+ vt |= VT_VARIANT;
563
+
564
if ((vt & ~VT_ARRAY) && //new variant have some type except VT_ARRAY
565
(V_VT(&obj->v) & VT_ARRAY) && //our variant is array
566
SafeArrayGetDim(V_ARRAY(&obj->v)) == 1 && //our array have one dimension
0 commit comments