mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-08 04:22:40 +00:00
Be forward compatible to PHP 7's "Uniform Variable Syntax"
https://wiki.php.net/rfc/uniform_variable_syntax
This commit is contained in:
parent
d114fa1431
commit
120bd37ffa
1 changed files with 3 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue