summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-03-25 20:11:16 +0100
committerDavid <ottodavid@gmx.net>2014-08-21 17:31:17 +0200
commit3d9d3c19d4b687766cfc030be4175ce677b792c3 (patch)
tree4e9127cdfbcc287acd1eae5db3d7e8e617a9c13e /framework/Web/UI/WebControls
parent2c1e56b22a023033ae4afd5db8d51f605037f2de (diff)
Fix #504
(cherry picked from commit 3d0ecbdc3141740be8d9ddda0a2c6f293dbc099c)
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TPanel.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/framework/Web/UI/WebControls/TPanel.php b/framework/Web/UI/WebControls/TPanel.php
index 2256420b..2bf1b40d 100644
--- a/framework/Web/UI/WebControls/TPanel.php
+++ b/framework/Web/UI/WebControls/TPanel.php
@@ -229,12 +229,7 @@ class TPanel extends TWebControl
if(($butt=$this->getDefaultButton())!=='')
{
- $buttons = $this->findControlsByID($butt);
- if (count($buttons)>0)
- $button = reset($buttons);
- else
- $button = null;
- if($button===null)
+ if(($button=$this->findControl($butt))===null)
throw new TInvalidDataValueException('panel_defaultbutton_invalid',$butt);
else
$this->getPage()->getClientScript()->registerDefaultButton($this, $button);