From: martinlanghoff Date: Thu, 4 Jan 2007 03:34:48 +0000 (+0000) Subject: mnet/environment: Bugfix X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8c99567eecdb431e3e0123ab2583941ebbec9344;p=moodle.git mnet/environment: Bugfix Author: Donal McMullan --- diff --git a/mnet/environment.php b/mnet/environment.php index 9b8129ac32..90c5a13bcc 100644 --- a/mnet/environment.php +++ b/mnet/environment.php @@ -37,7 +37,7 @@ class mnet_environment { $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 @@ class mnet_environment { 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 @@ class mnet_environment { $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); }