In Method getMauticVersion():
public function getMauticVersion()`
{
$headers = $this->auth->getResponseHeaders();
if (isset($headers['Mautic-Version'])) {
return $headers['Mautic-Version'];
}
return null;
}
Unfortunately, the header (at least on our Mautic installation on Debian Buster) is all lower-case: "mautic-version", not "Mautic-Version". So, this method will always return null.
Solution:
Avoid case-sensitive checks on headers here. Simple workaround (could be done better...):
public function getMauticVersion()
{
$headers = $this->auth->getResponseHeaders();
if (isset($headers['Mautic-Version'])) {
return $headers['Mautic-Version'];
}
if (isset($headers['mautic-version'])) {
return $headers['mautic-version'];
}
return null;
}
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.