php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56188 PHPScript does not respect ScriptControl.Reset
Submitted: 2004-09-06 12:02 UTC Modified: 2015-03-23 20:13 UTC
From: codemastr at unrealircd dot com Assigned:
Status: Not a bug Package: PHPScript (PECL)
PHP Version: 5CVS-2004-09-06 (dev) OS: Windows XP Home
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: codemastr at unrealircd dot com
New email:
PHP Version: OS:

 

 [2004-09-06 12:02 UTC] codemastr at unrealircd dot com
Description:
------------
When you call ScriptControl.Reset, the script should be reset to its initial state. This is what happens for all other languages, but not PHPScript.

Reproduce code:
---------------
var sc = new ActiveXObject("ScriptControl");
sc.Language = "PHPScript";
sc.AddObject("WScript", WScript);
sc.AddCode("function test() { $WScript->Echo('test'); } test();");
sc.Reset();
sc.AddCode("test();");

cscript /e:JScript thatfile.wsf

Expected result:
----------------
The expected result is that it should print "test" then return an error indicating that test is undefined (Reset removed the test function). The PHPScript should function like the below JScript code:

var sc = new ActiveXObject("ScriptControl");
sc.Language = "JScript";
sc.AddObject("WScript", WScript);
sc.AddCode("function test() { WScript.Echo('test'); } test();");
sc.Reset();
sc.AddCode("test();");

cscript /e:JScript thatfile.wsf

Actual result:
--------------
In PHPScript, the Reset is ignored and so the output is:

test
test

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-03-23 20:13 UTC] cmb@php.net
-Status: Open +Status: Not a bug
 [2015-03-23 20:13 UTC] cmb@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 14:01:30 2024 UTC