]> git.mxchange.org Git - friendica.git/commitdiff
Prevent side effect with cascade => false in dba::delete
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 22 Apr 2018 08:46:46 +0000 (04:46 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Sun, 22 Apr 2018 08:46:46 +0000 (04:46 -0400)
include/dba.php

index 3209021cf2a1f1819408bfe0365b3cd04e4bef5f..b41a7aab76bfd00a265196ff88916b4bb095b8dd 100644 (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];