|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-04-01 21:26 UTC] tpunt@php.net
-Status: Open
+Status: Wont fix
[2017-04-01 21:26 UTC] tpunt@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 22 12:00:01 2025 UTC |
Description: ------------ Like in #9406 reported, the interpretet loses the variables and includes after the host adds the script by AddCode(BSTR). After AddCode, the script will be executed and the interpreter seems to be ended. If the host calls an procedure with ->Run("prodecure","parameters") the variables and includes outside the procedure are empty Reproduce code: --------------- This Code in for Visual Basic (5/6) Set script = CreateObject("MSScriptControl.ScriptControl.1") script.Language = "PHPScript" script.AddObject "WScript", CreateObject("WScript.Shell") script.AllowUI = True script.UseSafeSubset = False script.AddCode "$a = 0; $b = 1; $c = 'a'; function abc() { global $b; $WScript->Popup($b); } $WScript->Popup($b);" script.run "abc" Expected result: ---------------- --------------------------- Windows Script Host --------------------------- 1 --------------------------- OK --------------------------- An dialog showing the content of $b (which is 1) - the dialog should be shown 2 times Actual result: -------------- The dialog appears online 1 time, the call of "abc" results in an error Uncaught exception 'com_exception' with message 'Parameter 0: Typkonflikt. ' in fragment:1 Stack trace: #0 fragment(1): variant->Popup(NULL) #1 [internal function]: abc() #2 {main} thrown As you can see.. $b is NULL