forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #79299: com_print_typeinfo prints duplicate variables
`lastid` has to retain its value during the traversal, so we move it to an outer scope. Patch contributed by Litiano Moura.
- Loading branch information
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
Bug #79299 (com_print_typeinfo prints duplicate variables) | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available'); | ||
?> | ||
--FILE-- | ||
<?php | ||
$dict = new COM("Scripting.Dictionary"); | ||
ob_start(); | ||
com_print_typeinfo($dict); | ||
$typeinfo = ob_get_clean(); | ||
preg_match_all('/\/\* DISPID=9 \*\//', $typeinfo, $matches); | ||
var_dump($matches[0]); | ||
?> | ||
--EXPECT-- | ||
array(1) { | ||
[0]=> | ||
string(14) "/* DISPID=9 */" | ||
} |