From 90cda34b980b9041eb9459184a82a1d3a97a0981 Mon Sep 17 00:00:00 2001 From: alan bount Date: Wed, 8 Jan 2014 10:53:19 -0500 Subject: [PATCH] added an exception to help notify re:missing class --- Controller/OpauthAppController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Controller/OpauthAppController.php b/Controller/OpauthAppController.php index e3afd46..5ad9b2e 100644 --- a/Controller/OpauthAppController.php +++ b/Controller/OpauthAppController.php @@ -136,6 +136,9 @@ protected function _loadOpauth($config = null, $run = false){ } App::import('Vendor', 'Opauth.Opauth/lib/Opauth/Opauth'); + if (!class_exists('Opauth')) { + throw new CakeException('Unable to load Opauth class. [app/Plugin/Opauth/Vendor/Opauth] Did you load submodules?'); + } $this->Opauth = new Opauth( $config, $run ); } -} \ No newline at end of file +}