Skip to content
Browse files

mnet/environment: Bugfix

Author: Donal McMullan <donal@catalyst.net.nz>
  • Loading branch information...
1 parent 735c7be commit 8c99567eecdb431e3e0123ab2583941ebbec9344 martinlanghoff committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 mnet/environment.php
View
6 mnet/environment.php
@@ -37,7 +37,7 @@ function init() {
$hostobject = get_record('mnet_host','id', $CFG->mnet_localhost_id);
if(is_object($hostobject)) {
$temparr = get_object_vars($hostobject);
- foreach(get_object_vars($temparr) as $key => $value) {
+ foreach($temparr as $key => $value) {
$this->$key = $value;
}
unset($hostobject, $temparr);
@@ -82,7 +82,7 @@ function get_keypair() {
if (!empty($keypair)) {
// Explode/Implode is faster than Unserialize/Serialize
- $this->keypair = explode('@@@@@@@@', $keypair);
+ list($this->keypair['certificate'], $this->keypair['keypair_PEM']) = explode('@@@@@@@@', $keypair);
}
if ($this->public_key_expires > time()) {
@@ -126,7 +126,7 @@ function get_keypair() {
$details = openssl_x509_parse($this->public_key);
$this->public_key_expires = $details['validTo_time_t'];
- set_config('openssl', implode('@@@@@@@@', $this->keypair);
+ set_config('openssl', implode('@@@@@@@@', $this->keypair), 'mnet');
update_record('mnet_host', $this);
}

0 comments on commit 8c99567

Please sign in to comment.
Something went wrong with that request. Please try again.