-
-
Save derekschrock/211ac4a32673321b7a8fb8bca6476f93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/jails/apache/usr/local/www/phpvirtualbox/endpoints/lib/vboxconnector.php 2017-09-10 05:57:43.000000000 -0400 | |
+++ vboxconnector.php 2017-12-22 21:57:11.691738000 -0500 | |
@@ -1593,7 +1593,7 @@ | |
// 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 @@ | |
// 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) | |
@@ -3942,7 +3942,7 @@ | |
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, | |
@@ -4498,7 +4498,7 @@ | |
} | |
// 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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
confirm correct working