From b82e29d13bdc514c36cdbf56b61c77931bbe204c Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Mon, 9 Jul 2018 12:01:23 -0400 Subject: [PATCH] Validate options. --- module/VuFind/src/VuFind/Related/SimilarFactory.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/VuFind/src/VuFind/Related/SimilarFactory.php b/module/VuFind/src/VuFind/Related/SimilarFactory.php index 02b53182520..51413401179 100644 --- a/module/VuFind/src/VuFind/Related/SimilarFactory.php +++ b/module/VuFind/src/VuFind/Related/SimilarFactory.php @@ -58,6 +58,9 @@ class SimilarFactory implements FactoryInterface public function __invoke(ContainerInterface $container, $requestedName, array $options = null ) { + if (!empty($options)) { + throw new \Exception('Unexpected options passed to factory.'); + } return new $requestedName($container->get('VuFindSearch\Service')); } } -- GitLab