VirtualBox

Opened 14 years ago

Closed 14 years ago

#6416 closed defect (fixed)

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:
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 (2)

comment:1 by Frank Mehnert, 14 years ago

Summary: PHP web api functions fail because of missing "new" in the IMachine functions' bodiesPHP 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 by Frank Mehnert, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use