mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Update in_array() check to avoid fatal error
Enabling the $strict parameter to true avoids PHP's default behavior when search for an array in an array, which throws a fatal error if circular references exist - http://php.net/in_array#refsect1-function.in-array-parameters
This commit is contained in:
parent
514974900f
commit
2eadb89ff6
1 changed files with 1 additions and 1 deletions
|
@ -1561,7 +1561,7 @@ class DboSource extends DataSource {
|
||||||
if (!empty($assocData['order'])) {
|
if (!empty($assocData['order'])) {
|
||||||
$queryData['order'][] = $assocData['order'];
|
$queryData['order'][] = $assocData['order'];
|
||||||
}
|
}
|
||||||
if (!in_array($join, $queryData['joins'])) {
|
if (!in_array($join, $queryData['joins'], true)) {
|
||||||
$queryData['joins'][] = $join;
|
$queryData['joins'][] = $join;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue