Prevent side effect with cascade => false in dba::delete

This commit is contained in:
Hypolite Petovan 2018-04-22 04:46:46 -04:00
parent 18078ce7a4
commit ba3f721524

View file

@ -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];