From c45d19daee358ac64a759d6de4e22579e3ae5bb4 Mon Sep 17 00:00:00 2001 From: Bas Kamer Date: Wed, 15 Mar 2017 11:03:57 +0100 Subject: [PATCH] =?UTF-8?q?shouldn=E2=80=99t=20throw=20exception=20in=20?= =?UTF-8?q?=5F=5FtoString=20magic=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SlmLocale/View/Helper/LocaleMenu.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/SlmLocale/View/Helper/LocaleMenu.php b/src/SlmLocale/View/Helper/LocaleMenu.php index 20c9a57..ade280e 100644 --- a/src/SlmLocale/View/Helper/LocaleMenu.php +++ b/src/SlmLocale/View/Helper/LocaleMenu.php @@ -230,13 +230,12 @@ public function __invoke() /** * @param array $options * @return string - * @throws RuntimeException * @todo implement add way to completely default rendering for maximum flexibility (see Zend\View\Helper\Navigation::renderPartial) */ public function __toString() { if (! ($detector = $this->getDetector())) { - throw new RuntimeException('To assemble an url, a detector is required'); + return sprintf('', ($this->getUlClass()) ? sprintf(' class="%s"', $this->getUlClass()) : ''); } $list = '';