Skip to content
Snippets Groups Projects
Commit 850515b9 authored by Demian Katz's avatar Demian Katz
Browse files

Fixed serialization problem.

parent 1ee7ac1c
No related merge requests found
...@@ -220,6 +220,18 @@ abstract class Options implements TranslatorAwareInterface ...@@ -220,6 +220,18 @@ abstract class Options implements TranslatorAwareInterface
public function __construct(\VuFind\Config\PluginManager $configLoader) public function __construct(\VuFind\Config\PluginManager $configLoader)
{ {
$this->limitOptions = [$this->defaultLimit]; $this->limitOptions = [$this->defaultLimit];
$this->setConfigLoader($configLoader);
}
/**
* Set the config loader
*
* @param \VuFind\Config\PluginManager $configLoader Config loader
*
* @return void
*/
public function setConfigLoader(\VuFind\Config\PluginManager $configLoader)
{
$this->configLoader = $configLoader; $this->configLoader = $configLoader;
} }
...@@ -784,6 +796,7 @@ abstract class Options implements TranslatorAwareInterface ...@@ -784,6 +796,7 @@ abstract class Options implements TranslatorAwareInterface
public function __sleep() public function __sleep()
{ {
$vars = get_object_vars($this); $vars = get_object_vars($this);
unset($vars['configLoader']);
unset($vars['translator']); unset($vars['translator']);
$vars = array_keys($vars); $vars = array_keys($vars);
return $vars; return $vars;
......
...@@ -551,6 +551,8 @@ abstract class Results implements ServiceLocatorAwareInterface ...@@ -551,6 +551,8 @@ abstract class Results implements ServiceLocatorAwareInterface
// Restore translator: // Restore translator:
$this->getOptions() $this->getOptions()
->setTranslator($serviceLocator->get('VuFind\Translator')); ->setTranslator($serviceLocator->get('VuFind\Translator'));
$this->getOptions()
->setConfigLoader($serviceLocator->get('VuFind\Config'));
return $this; return $this;
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment