Browse Source

Be forward compatible to PHP 7's "Uniform Variable Syntax"

https://wiki.php.net/rfc/uniform_variable_syntax
Marc Würth 11 years ago
parent
commit
120bd37ffa
1 changed files with 3 additions and 3 deletions
  1. 3 3
      lib/Cake/Console/Command/Task/ControllerTask.php

+ 3 - 3
lib/Cake/Console/Command/Task/ControllerTask.php

@@ -248,10 +248,10 @@ class ControllerTask extends BakeTask {
 		);
 
 		foreach ($properties as $var => $title) {
-			if (count($$var)) {
+			if (count(${$var})) {
 				$output = '';
-				$length = count($$var);
-				foreach ($$var as $i => $propElement) {
+				$length = count(${$var});
+				foreach (${$var} as $i => $propElement) {
 					if ($i != $length - 1) {
 						$output .= ucfirst($propElement) . ', ';
 					} else {