PHP V8 warning error, use of not declared array

This commit is contained in:
BENKE Charlene 2021-07-19 17:51:06 +02:00 committed by GitHub
parent c0d54fe608
commit 98a2c35ab5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1263,7 +1263,11 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
if (is_array($this->boxes)) {
foreach ($this->boxes as $key => $value) {
//$titre = $this->boxes[$key][0];
$file = $this->boxes[$key]['file'];
if (empty($this->boxes[$key]['file'])) {
$file = isset($this->boxes[$key][1]) ? $this->boxes[$key][1] : ''; // For backward compatibility
} else
$file = $this->boxes[$key]['file'];
//$note = $this->boxes[$key][2];
// TODO If the box is also included by another module and the other module is still on, we should not remove it.
@ -1276,10 +1280,6 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
}
}
if (empty($file)) {
$file = isset($this->boxes[$key][1]) ? $this->boxes[$key][1] : ''; // For backward compatibility
}
if ($this->db->type == 'sqlite3') {
// sqlite doesn't support "USING" syntax.
// TODO: remove this dependency.