diff --git a/core-bundle/src/Resources/contao/library/Contao/System.php b/core-bundle/src/Resources/contao/library/Contao/System.php index 9c72582fb8a..8c8b5f0b0b7 100644 --- a/core-bundle/src/Resources/contao/library/Contao/System.php +++ b/core-bundle/src/Resources/contao/library/Contao/System.php @@ -187,6 +187,10 @@ protected function import($strClass, $strKey=null, $blnForce=false) { throw new ServiceNotFoundException($strClass, null, null, array(), sprintf('The "%s" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.', $strClass)); } + elseif (!class_exists($strClass)) + { + throw new \RuntimeException('System::import() failed because class "' . $strClass . '" is not a valid class name or does not exist.'); + } elseif (\in_array('getInstance', get_class_methods($strClass))) { static::$arrStaticObjects[$strKey] = static::$arrSingletons[$strKey] = $this->arrObjects[$strKey] = \call_user_func(array($strClass, 'getInstance')); @@ -239,6 +243,10 @@ public static function importStatic($strClass, $strKey=null, $blnForce=false) { throw new ServiceNotFoundException($strClass, null, null, array(), sprintf('The "%s" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.', $strClass)); } + elseif (!class_exists($strClass)) + { + throw new \RuntimeException('System::importStatic() failed because class "' . $strClass . '" is not a valid class name or does not exist.'); + } elseif (\in_array('getInstance', get_class_methods($strClass))) { static::$arrStaticObjects[$strKey] = static::$arrSingletons[$strKey] = \call_user_func(array($strClass, 'getInstance')); diff --git a/faq-bundle/src/Resources/contao/dca/tl_user.php b/faq-bundle/src/Resources/contao/dca/tl_user.php index 721ccad0d21..42a1ed2e06a 100644 --- a/faq-bundle/src/Resources/contao/dca/tl_user.php +++ b/faq-bundle/src/Resources/contao/dca/tl_user.php @@ -16,7 +16,7 @@ ->applyToPalette('custom', 'tl_user') ; -// Add fields to tl_user_group +// Add fields to tl_user $GLOBALS['TL_DCA']['tl_user']['fields']['faqs'] = array ( 'exclude' => true, diff --git a/news-bundle/src/Resources/contao/dca/tl_user.php b/news-bundle/src/Resources/contao/dca/tl_user.php index ade16fbe71e..1f91d51c7f7 100644 --- a/news-bundle/src/Resources/contao/dca/tl_user.php +++ b/news-bundle/src/Resources/contao/dca/tl_user.php @@ -16,7 +16,7 @@ ->applyToPalette('custom', 'tl_user') ; -// Add fields to tl_user_group +// Add fields to tl_user $GLOBALS['TL_DCA']['tl_user']['fields']['news'] = array ( 'exclude' => true, diff --git a/newsletter-bundle/src/Resources/contao/dca/tl_user.php b/newsletter-bundle/src/Resources/contao/dca/tl_user.php index a8f34f8b95f..1eea4f5c9f0 100644 --- a/newsletter-bundle/src/Resources/contao/dca/tl_user.php +++ b/newsletter-bundle/src/Resources/contao/dca/tl_user.php @@ -16,7 +16,7 @@ ->applyToPalette('custom', 'tl_user') ; -// Add fields to tl_user_group +// Add fields to tl_user $GLOBALS['TL_DCA']['tl_user']['fields']['newsletters'] = array ( 'exclude' => true,