Commit 6c47d161 authored by catch's avatar catch

Issue #2032253 by elachlan: Fixed CronForm accesses State incorrectly.

parent e855a496
......@@ -9,7 +9,7 @@
use Drupal\Core\Config\ConfigFactory;
use Drupal\Core\Config\Context\ContextInterface;
use Drupal\Core\KeyValueStore\KeyValueFactory;
use Drupal\Core\KeyValueStore\KeyValueStoreInterface;
use Drupal\system\SystemConfigFormBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
......@@ -36,9 +36,9 @@ class CronForm extends SystemConfigFormBase {
* @param \Drupal\Core\KeyValueStore\KeyValueStoreInterface $state
* The state key value store.
*/
public function __construct(ConfigFactory $config_factory, ContextInterface $context, KeyValueFactory $key_value_factory) {
public function __construct(ConfigFactory $config_factory, ContextInterface $context, KeyValueStoreInterface $state) {
parent::__construct($config_factory, $context);
$this->state = $key_value_factory->get('state');
$this->state = $state;
}
/**
......@@ -48,7 +48,7 @@ public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('config.context.free'),
$container->get('keyvalue')
$container->get('state')
);
}
......
Markdown is supported
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