Fixed deprecation notice strupper in DboSource

This commit is contained in:
Kamil Wylegala 2022-01-04 18:49:06 +01:00
parent 08f228f02a
commit b9630655d8

View file

@ -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']})");