mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
fixes #6277, relaxing character length comparison for UUID
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8149 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
6e91ee7ad4
commit
0cc3d5149f
1 changed files with 2 additions and 2 deletions
|
@ -1210,7 +1210,7 @@ class Model extends Overloadable {
|
||||||
foreach ($this->_schema as $field => $properties) {
|
foreach ($this->_schema as $field => $properties) {
|
||||||
if ($this->primaryKey === $field) {
|
if ($this->primaryKey === $field) {
|
||||||
$fInfo = $this->_schema[$field];
|
$fInfo = $this->_schema[$field];
|
||||||
$isUUID = ($fInfo['length'] === 36 &&
|
$isUUID = ($fInfo['length'] == 36 &&
|
||||||
($fInfo['type'] === 'string' || $fInfo['type'] === 'binary')
|
($fInfo['type'] === 'string' || $fInfo['type'] === 'binary')
|
||||||
);
|
);
|
||||||
if (empty($this->data[$this->alias][$this->primaryKey]) && $isUUID) {
|
if (empty($this->data[$this->alias][$this->primaryKey]) && $isUUID) {
|
||||||
|
@ -1279,7 +1279,7 @@ class Model extends Overloadable {
|
||||||
));
|
));
|
||||||
|
|
||||||
$isUUID = !empty($this->{$join}->primaryKey) && (
|
$isUUID = !empty($this->{$join}->primaryKey) && (
|
||||||
$this->{$join}->_schema[$this->{$join}->primaryKey]['length'] === 36 && (
|
$this->{$join}->_schema[$this->{$join}->primaryKey]['length'] == 36 && (
|
||||||
$this->{$join}->_schema[$this->{$join}->primaryKey]['type'] === 'string' ||
|
$this->{$join}->_schema[$this->{$join}->primaryKey]['type'] === 'string' ||
|
||||||
$this->{$join}->_schema[$this->{$join}->primaryKey]['type'] === 'binary'
|
$this->{$join}->_schema[$this->{$join}->primaryKey]['type'] === 'binary'
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue