Merge pull request #4896 from MrPetovan/bug/infinite-loop-in-dba-delete

Prevent side effect with cascade => false in dba::delete
2022.09-rc
Tobias Diekershoff 2018-04-22 12:23:11 +02:00 zatwierdzone przez GitHub
commit ea4e9b2cce
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -894,7 +894,7 @@ class dba {
}
// Is there a relation entry for the table?
if (isset(self::$relation[$table])) {
if ($cascade && isset(self::$relation[$table])) {
// We only allow a simple "one field" relation.
$field = array_keys(self::$relation[$table])[0];
$rel_def = array_values(self::$relation[$table])[0];