Skip to content

Commit

Permalink
You cant pass func_get_args() in PHP < 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Sep 14, 2012
1 parent bf18fc4 commit c7faad9
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions lib/Cake/Controller/Component/SecurityComponent.php
Expand Up @@ -246,7 +246,8 @@ public function startup(Controller $controller) {
* @link http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#SecurityComponent::requirePost
*/
public function requirePost() {
$this->_requireMethod('Post', func_get_args());
$args = func_get_args();
$this->_requireMethod('Post', $args);
}

/**
Expand All @@ -255,7 +256,8 @@ public function requirePost() {
* @return void
*/
public function requireGet() {
$this->_requireMethod('Get', func_get_args());
$args = func_get_args();
$this->_requireMethod('Get', $args);
}

/**
Expand All @@ -264,7 +266,8 @@ public function requireGet() {
* @return void
*/
public function requirePut() {
$this->_requireMethod('Put', func_get_args());
$args = func_get_args();
$this->_requireMethod('Put', $args);
}

/**
Expand All @@ -273,7 +276,8 @@ public function requirePut() {
* @return void
*/
public function requireDelete() {
$this->_requireMethod('Delete', func_get_args());
$args = func_get_args();
$this->_requireMethod('Delete', $args);
}

/**
Expand All @@ -283,7 +287,8 @@ public function requireDelete() {
* @link http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#SecurityComponent::requireSecure
*/
public function requireSecure() {
$this->_requireMethod('Secure', func_get_args());
$args = func_get_args();
$this->_requireMethod('Secure', $args);
}

/**
Expand All @@ -293,7 +298,8 @@ public function requireSecure() {
* @link http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#SecurityComponent::requireAuth
*/
public function requireAuth() {
$this->_requireMethod('Auth', func_get_args());
$args = func_get_args();
$this->_requireMethod('Auth', $args);
}

/**
Expand Down

0 comments on commit c7faad9

Please sign in to comment.