summaryrefslogtreecommitdiffstats
path: root/endpoints/lib/vboxServiceWrappers.php
diff options
context:
space:
mode:
authorh6w <tudor@tudorholton.com>2017-10-26 16:53:14 +1100
committerGitHub <noreply@github.com>2017-10-26 16:53:14 +1100
commit511b11ee2f43677edb2850cfe2bf26e091b6eedd (patch)
tree3fd3224c1313ef7ce747edd621020a3eb92d413d /endpoints/lib/vboxServiceWrappers.php
parent11206435d3656c20b0f552942f58881836e311d6 (diff)
parentc4c0029b9832b254623eb2240e7441575cf40f9c (diff)
downloadphpvirtualbox-511b11ee2f43677edb2850cfe2bf26e091b6eedd.zip
phpvirtualbox-511b11ee2f43677edb2850cfe2bf26e091b6eedd.tar.gz
phpvirtualbox-511b11ee2f43677edb2850cfe2bf26e091b6eedd.tar.bz2
Merge pull request #67 from phpvirtualbox/develop
phpvirtualbox 5.2 #RC1
Diffstat (limited to 'endpoints/lib/vboxServiceWrappers.php')
-rw-r--r--endpoints/lib/vboxServiceWrappers.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/endpoints/lib/vboxServiceWrappers.php b/endpoints/lib/vboxServiceWrappers.php
index 7b33f0d..b9ff86b 100644
--- a/endpoints/lib/vboxServiceWrappers.php
+++ b/endpoints/lib/vboxServiceWrappers.php
@@ -7889,6 +7889,10 @@ class IMedium extends VBox_ManagedObject
public function changeEncryption($arg_currentPassword, $arg_cipher, $arg_newPassword, $arg_newPasswordId)
{
+ // No password ID in case of decryption and de-/encryption are both handled here.
+ $isDecryption = ($arg_cipher == '') && ($arg_newPassword == '');
+ $arg_newPasswordId = $isDecryption ? '' : $arg_newPasswordId;
+
$request = new stdClass();
$request->_this = $this->handle;
$request->currentPassword = $arg_currentPassword;