bugfix error if memcached_servers is empty in koha-conf.xml
authorMichael Hafen <mdhafen@tech.washk12.org>
Wed, 26 Aug 2009 22:43:59 +0000 (16:43 -0600)
committerGalen Charlton <gmcharlt@gmail.com>
Mon, 31 Aug 2009 01:55:15 +0000 (21:55 -0400)
commit051477fbfed3667b08280ec29ed87978dd6b7d3c
treeb5a9cc383f50905924672f662c4c0d3558f6c851
parent84e88bd42eeb9e083a1bba16db1479adb8355c14
bugfix error if memcached_servers is empty in koha-conf.xml

XML::Simple returns by default an empty hash ref if it encounters an xml tag
with no attributes or content.  If memcached_servers is empty, as the installer
sets it when this feature is disabled, then we get the empty hash ref.

In checking if memcached_servers is set the empty hash ref evaluates as true.
I.E.

  $servers = C4::Context->config('memcached_servers');
  if ($servers) {

so we get a comiler error from memcached trying to resolve the nonexistant
server address.
C4/Context.pm