PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
← All changes | src/Framework/FieldsAPI/Concerns/NameCollision.php +3 -2 2.30.04.16.9 View file →
@@ -25,8 +25,9 @@
25 25 }
26 26 }
27 27
28 28 /**
29 + * @since 2.32.0 add existing and incoming nodes to exception
29 30 * @since 2.10.2
30 31 *
31 32 * @throws NameCollisionException
32 33 */
@@ -31,9 +32,9 @@
31 32 * @throws NameCollisionException
32 33 */
33 34 public function checkNameCollision(Node $node)
34 35 {
35 - if ($this->getNodeByName($node->getName())) {
36 - throw new NameCollisionException($node->getName());
36 + if ($existingNode = $this->getNodeByName($node->getName())) {
37 + throw new NameCollisionException($node->getName(), $existingNode, $node);
37 38 }
38 39 }
39 40 }