From 8593f10ecc27f2d02973f97fe60f8c477bda5017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Sun, 12 Jan 2014 14:47:17 +0100 Subject: [PATCH] fml fix --- application/core/FML/Controls/Frame.php | 2 +- application/core/FML/ManiaLink.php | 4 +++- application/core/FML/ManiaLinks.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/application/core/FML/Controls/Frame.php b/application/core/FML/Controls/Frame.php index a63faa97..d6db26ae 100644 --- a/application/core/FML/Controls/Frame.php +++ b/application/core/FML/Controls/Frame.php @@ -33,7 +33,7 @@ class Frame extends Control implements Container { * @return \FML\Controls\Frame */ public function add(Renderable $child) { - if (!in_array($child, $this->children)) { + if (!in_array($child, $this->children, true)) { array_push($this->children, $child); } return $this; diff --git a/application/core/FML/ManiaLink.php b/application/core/FML/ManiaLink.php index a67b70dd..534742c4 100644 --- a/application/core/FML/ManiaLink.php +++ b/application/core/FML/ManiaLink.php @@ -95,7 +95,9 @@ class ManiaLink implements Container { * @return \FML\ManiaLink */ public function add(Renderable $child) { - array_push($this->children, $child); + if (!in_array($child, $this->children, true)) { + array_push($this->children, $child); + } return $this; } diff --git a/application/core/FML/ManiaLinks.php b/application/core/FML/ManiaLinks.php index 0a459540..0d10c33e 100644 --- a/application/core/FML/ManiaLinks.php +++ b/application/core/FML/ManiaLinks.php @@ -34,7 +34,7 @@ class ManiaLinks { * @return \FML\ManiaLinks */ public function add(ManiaLink $child) { - if (!in_array($child, $this->children)) { + if (!in_array($child, $this->children, true)) { array_push($this->children, $child); } return $this;