|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-03-13 20:39 UTC] ksingla@php.net
[2010-03-13 20:46 UTC] ksingla@php.net
-Status: Open
+Status: Bogus
[2010-03-13 20:46 UTC] ksingla@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 05:00:01 2025 UTC |
Description: ------------ Test script works, as expected, under PHP4. Gives nonsensical error under PHP5. Test script: --------------- <?php $registry = new COM('winmgmts:root/DEFAULT:StdRegProv'); $values = new VARIANT(); echo $registry->getBinaryValue(0x80000002, 'SOFTWARE\\Microsoft\\Cryptography\\RNG', 'Seed', $values); var_dump($values->value); ?> Expected result: ---------------- From PHP4: array(80) { [0]=> int(105) [1]=> int(144) [2]=> int(158) [3]=> int(99) [4]=> int(155) [5]=> int(55) [6]=> int(130) [7]=> int(185) [8]=> int(210) [9]=> int(60) [10]=> int(182) [11]=> int(200) [12]=> int(170) [13]=> int(52) [14]=> int(34) [15]=> int(86) [16]=> int(17) [17]=> int(147) [18]=> int(100) [19]=> int(212) [20]=> int(205) [21]=> int(146) [22]=> int(243) [23]=> int(102) [24]=> int(17) [25]=> int(159) [26]=> int(193) [27]=> int(252) [28]=> int(189) [29]=> int(83) [30]=> int(143) [31]=> int(51) [32]=> int(183) [33]=> int(3) [34]=> int(48) [35]=> int(46) [36]=> int(102) [37]=> int(73) [38]=> int(210) [39]=> int(237) [40]=> int(13) [41]=> int(244) [42]=> int(194) [43]=> int(117) [44]=> int(254) [45]=> int(234) [46]=> int(166) [47]=> int(147) [48]=> int(104) [49]=> int(192) [50]=> int(211) [51]=> int(117) [52]=> int(50) [53]=> int(148) [54]=> int(253) [55]=> int(148) [56]=> int(237) [57]=> int(85) [58]=> int(70) [59]=> int(242) [60]=> int(32) [61]=> int(159) [62]=> int(38) [63]=> int(182) [64]=> int(211) [65]=> int(36) [66]=> int(205) [67]=> int(115) [68]=> int(212) [69]=> int(117) [70]=> int(40) [71]=> int(249) [72]=> int(102) [73]=> int(67) [74]=> int(100) [75]=> int(147) [76]=> int(236) [77]=> int(194) [78]=> int(241) [79]=> int(28) } Actual result: -------------- From PHP5: Fatal error: Uncaught exception 'com_exception' with message 'this variant has no properties' in C:\php\test.php:5 Stack trace: #0 C:\php\test.php(5): unknown() #1 {main} thrown in C:\php\test.php on line 5