Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Check for front controller in constructor

  • Loading branch information...
commit e22b487ebbdb1197612710207a89ec8d9b9edd53 1 parent c5996b6
@marcguyer authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 Http/ZendAdapter.php
View
7 Http/ZendAdapter.php
@@ -19,16 +19,15 @@ class CheddarGetter_Http_ZendAdapter extends CheddarGetter_Http_NativeAdapter {
private $_request;
public function __construct() {
-
+ if (!class_exists('Zend_Controller_Front')) {
+ throw new CheddarGetter_Client_Exception('The Zend front controller is not available.', CheddarGetter_Client_Exception::USAGE_INVALID);
+ }
}
private function _request() {
if ($this->_request) {
return $this->_request;
}
- if (!class_exists('Zend_Controller_Front')) {
- throw new CheddarGetter_Client_Exception('The Zend front controller is not available.', CheddarGetter_Client_Exception::USAGE_INVALID);
- }
$this->_request = Zend_Controller_Front::getInstance()->getRequest();
return $this->_request;
}
Please sign in to comment.
Something went wrong with that request. Please try again.