VirtualBox

Ticket #6416 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

PHP web api functions fail because of missing "new" in the IMachine functions' bodies => Fixed in SVN/3.1.6

Reported by: Sm0k1n Owned by:
Priority: minor Component: webservices
Version: VirtualBox 3.1.4 Keywords: php, undefined, stdClass, IMachine
Cc: Guest type: other
Host type: Linux

Description

When modifying a virtual machine's settings like RAM and VRAM I get an error that says that the function stdClass() is not defined.

When inspecting the vboxServiceWrappers.php file I noticed that in the IMachine->setMemorySize() function there is a missing "new" in the initialization of the $request variable:

$request = stdClass();

should be

$request = new stdClass();

as it is with all other functions I have seen in this file. From what I can see, it seems that this is intentionally done for all "set" methods in the IMachine class.

Simply adding the missing "new" solves the issue and the functions work properly.

Change History

comment:1 Changed 4 years ago by frank

  • Summary changed from PHP web api functions fail because of missing "new" in the IMachine functions' bodies to PHP web api functions fail because of missing "new" in the IMachine functions' bodies => Fixed in SVN/3.1.6

Thank you for this report. The upcoming maintenance release will contain a fix for this problem.

comment:2 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use