[php-src] Issue #9287: PHP 8.1.9 (tried also 7.4.3) VARIANT property assignment causes error (no error in equivalent VBScript)

From: Date: Tue, 09 Aug 2022 13:55:16 +0000
Subject: [php-src] Issue #9287: PHP 8.1.9 (tried also 7.4.3) VARIANT property assignment causes error (no error in equivalent VBScript)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242167@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9287 Author: usa- ### Description Note: MSMQ is a standard COM library present in all Windows versions. The following code: ```php <?php $msg = new COM("MSMQ.MSMQMessage", null, CP_UTF8); $msg->Body = 123; ``` Resulted in this output: ``` PHP Fatal error: Uncaught com_exception: Source: MSMQMessage Description: The parameter is incorrect. in C:\Temp\test.php:3 Stack trace: #0 {main} thrown in C:\Temp\test.php on line 3 ``` But I expected NO OUTPUT AT ALL. Equivalent VBScript code, which does not cause any errors: ```vbnet Set msg = CreateObject("MSMQ.MSMQMessage") msg.Body = 123 ``` Both files attached: [test.zip](https://github.com/php/php-src/files/9291282/test.zip) ### PHP Version php-8.1.9-nts-Win32-vs16-x64 ### Operating System Windows 10 x64

« previous php.bugs (#242167) next »