mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Now the tableParameters array gets escaped through values(), too
This commit is contained in:
parent
b3770974f1
commit
2ad181b6e1
1 changed files with 5 additions and 6 deletions
|
@ -397,8 +397,10 @@ class CakeSchema extends Object {
|
|||
}
|
||||
|
||||
/**
|
||||
* Generate the code for a table. Takes a table name and $fields array
|
||||
* Returns a completed variable declaration to be used in schema classes.
|
||||
* Generate the schema code for a table.
|
||||
*
|
||||
* Takes a table name and $fields array and returns a completed,
|
||||
* escaped variable declaration to be used in schema classes.
|
||||
*
|
||||
* @param string $table Table name you want returned.
|
||||
* @param array $fields Array of field information to generate the table with.
|
||||
|
@ -426,10 +428,7 @@ class CakeSchema extends Object {
|
|||
$col .= implode(",\n\t\t\t", $props) . "\n\t\t";
|
||||
} elseif ($field === 'tableParameters') {
|
||||
$col = "\t\t'tableParameters' => array(";
|
||||
$props = array();
|
||||
foreach ((array)$value as $key => $param) {
|
||||
$props[] = "'{$key}' => '$param'";
|
||||
}
|
||||
$props = $this->_values($value);
|
||||
$col .= implode(', ', $props);
|
||||
}
|
||||
$col .= ")";
|
||||
|
|
Loading…
Reference in a new issue