mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed deprecation notice strupper in DboSource
This commit is contained in:
parent
08f228f02a
commit
b9630655d8
1 changed files with 2 additions and 1 deletions
|
@ -2070,7 +2070,8 @@ class DboSource extends DataSource {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function renderJoinStatement($data) {
|
public function renderJoinStatement($data) {
|
||||||
if (strtoupper($data['type']) === 'CROSS' || empty($data['conditions'])) {
|
//Fixed deprecation notice in PHP8.1 - fallback to empty string
|
||||||
|
if (strtoupper($data['type'] ?? "") === 'CROSS' || empty($data['conditions'])) {
|
||||||
return "{$data['type']} JOIN {$data['table']} {$data['alias']}";
|
return "{$data['type']} JOIN {$data['table']} {$data['alias']}";
|
||||||
}
|
}
|
||||||
return trim("{$data['type']} JOIN {$data['table']} {$data['alias']} ON ({$data['conditions']})");
|
return trim("{$data['type']} JOIN {$data['table']} {$data['alias']} ON ({$data['conditions']})");
|
||||||
|
|
Loading…
Reference in a new issue