Skip to content
This repository
Browse code

You cant pass func_get_args() in PHP < 5.3

  • Loading branch information...
commit c7faad9f78569e56580a4d0ee9edd3af4d4ce3ac 1 parent bf18fc4
Carl Sutton authored
18  lib/Cake/Controller/Component/SecurityComponent.php
@@ -246,7 +246,8 @@ public function startup(Controller $controller) {
246 246
  * @link http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#SecurityComponent::requirePost
247 247
  */
248 248
 	public function requirePost() {
249  
-		$this->_requireMethod('Post', func_get_args());
  249
+		$args = func_get_args();
  250
+		$this->_requireMethod('Post', $args);
250 251
 	}
251 252
 
252 253
 /**
@@ -255,7 +256,8 @@ public function requirePost() {
255 256
  * @return void
256 257
  */
257 258
 	public function requireGet() {
258  
-		$this->_requireMethod('Get', func_get_args());
  259
+		$args = func_get_args();
  260
+		$this->_requireMethod('Get', $args);
259 261
 	}
260 262
 
261 263
 /**
@@ -264,7 +266,8 @@ public function requireGet() {
264 266
  * @return void
265 267
  */
266 268
 	public function requirePut() {
267  
-		$this->_requireMethod('Put', func_get_args());
  269
+		$args = func_get_args();
  270
+		$this->_requireMethod('Put', $args);
268 271
 	}
269 272
 
270 273
 /**
@@ -273,7 +276,8 @@ public function requirePut() {
273 276
  * @return void
274 277
  */
275 278
 	public function requireDelete() {
276  
-		$this->_requireMethod('Delete', func_get_args());
  279
+		$args = func_get_args();
  280
+		$this->_requireMethod('Delete', $args);
277 281
 	}
278 282
 
279 283
 /**
@@ -283,7 +287,8 @@ public function requireDelete() {
283 287
  * @link http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#SecurityComponent::requireSecure
284 288
  */
285 289
 	public function requireSecure() {
286  
-		$this->_requireMethod('Secure', func_get_args());
  290
+		$args = func_get_args();
  291
+		$this->_requireMethod('Secure', $args);
287 292
 	}
288 293
 
289 294
 /**
@@ -293,7 +298,8 @@ public function requireSecure() {
293 298
  * @link http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#SecurityComponent::requireAuth
294 299
  */
295 300
 	public function requireAuth() {
296  
-		$this->_requireMethod('Auth', func_get_args());
  301
+		$args = func_get_args();
  302
+		$this->_requireMethod('Auth', $args);
297 303
 	}
298 304
 
299 305
 /**

0 notes on commit c7faad9

Please sign in to comment.
Something went wrong with that request. Please try again.