summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorh6w <tudor@tudorholton.com>2018-02-05 17:21:29 +1100
committerGitHub <noreply@github.com>2018-02-05 17:21:29 +1100
commit0fe163b0dec17159fc020ec9e89d6451e979e011 (patch)
tree0e7e9595eb40ce2e9ce6491150aa891f1f022392
parent83912a6128cdbc7730eff5465cbfdf0084bae02f (diff)
parent9ba7e5f710aa9b09aad532e4a8b664b68f01a107 (diff)
downloadphpvirtualbox-0fe163b0dec17159fc020ec9e89d6451e979e011.zip
phpvirtualbox-0fe163b0dec17159fc020ec9e89d6451e979e011.tar.gz
phpvirtualbox-0fe163b0dec17159fc020ec9e89d6451e979e011.tar.bz2
Merge pull request #98 from mylux/compatibility-php-7.2+
Compatibility with PHP 7.2+
-rw-r--r--endpoints/lib/vboxconnector.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/endpoints/lib/vboxconnector.php b/endpoints/lib/vboxconnector.php
index 8c0f712..01f8384 100644
--- a/endpoints/lib/vboxconnector.php
+++ b/endpoints/lib/vboxconnector.php
@@ -1593,7 +1593,7 @@ class vboxconnector {
// Network properties
$eprops = $n->getProperties(null);
$eprops = array_combine($eprops[1],$eprops[0]);
- $iprops = array_map(create_function('$a','$b=explode("=",$a); return array($b[0]=>$b[1]);'),preg_split('/[\r|\n]+/',$args['networkAdapters'][$i]['properties']));
+ $iprops = array_map(function($a){$b=explode("=",$a); return array($b[0]=>$b[1]);},preg_split('/[\r|\n]+/',$args['networkAdapters'][$i]['properties']));
$inprops = array();
foreach($iprops as $a) {
foreach($a as $k=>$v)
@@ -2113,7 +2113,7 @@ class vboxconnector {
// Network properties
$eprops = $n->getProperties(null);
$eprops = array_combine($eprops[1],$eprops[0]);
- $iprops = array_map(create_function('$a','$b=explode("=",$a); return array($b[0]=>$b[1]);'),preg_split('/[\r|\n]+/',$args['networkAdapters'][$i]['properties']));
+ $iprops = array_map(function($a){$b=explode("=",$a); return array($b[0]=>$b[1]);},preg_split('/[\r|\n]+/',$args['networkAdapters'][$i]['properties']));
$inprops = array();
foreach($iprops as $a) {
foreach($a as $k=>$v)
@@ -3944,7 +3944,7 @@ class vboxconnector {
else $nd = null;
$props = $n->getProperties(null);
- $props = implode("\n",array_map(create_function('$a,$b','return "$a=$b";'),$props[1],$props[0]));
+ $props = implode("\n",array_map(function($a,$b){return "$a=$b";},$props[1],$props[0]));
$adapters[] = array(
'adapterType' => (string)$n->adapterType,
@@ -4500,7 +4500,7 @@ class vboxconnector {
}
// sort by port then device
- usort($return,create_function('$a,$b', 'if($a["port"] == $b["port"]) { if($a["device"] < $b["device"]) { return -1; } if($a["device"] > $b["device"]) { return 1; } return 0; } if($a["port"] < $b["port"]) { return -1; } return 1;'));
+ usort($return,function($a,$b){if($a["port"] == $b["port"]) { if($a["device"] < $b["device"]) { return -1; } if($a["device"] > $b["device"]) { return 1; } return 0; } if($a["port"] < $b["port"]) { return -1; } return 1;});
return $return;
}