Skip to content
Permalink
Browse files

fixed issue with Engine::getVersion not passing agent to new Engine c…

…onstructor

Also added an isset() check to prevent PHP notices due to undefined array offset
  • Loading branch information...
shkkmo committed Feb 29, 2016
1 parent d16484f commit d9cd7be3762ab18a424337c9829215f9172a0c87
Showing with 3 additions and 2 deletions.
  1. +3 −2 Crypt/GPG/Engine.php
@@ -960,7 +960,8 @@ public function getVersion()
$options = array(
'homedir' => $this->_homedir,
'binary' => $this->_binary,
'debug' => $this->_debug
'debug' => $this->_debug,
'agent' => $this-_agent,
);
$engine = new self($options);
@@ -1662,7 +1663,7 @@ private function _openSubprocess()
);
$agentInfo = explode(' ', $agentInfo, 3);
$this->_agentInfo = $agentInfo[2];
$this->_agentInfo = isset($agentInfo[2])?$agentInfo[2]:null;
$env['GPG_AGENT_INFO'] = $this->_agentInfo;
// gpg-agent daemon is started, we can close the launching process

0 comments on commit d9cd7be

Please sign in to comment.
You can’t perform that action at this time.