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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Fri Dec 27 04:01:29 2024 UTC