summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-03-25 20:11:16 +0100
committerFabio Bas <ctrlaltca@gmail.com>2014-03-25 22:41:40 +0100
commit3d0ecbdc3141740be8d9ddda0a2c6f293dbc099c (patch)
treeb8ae286df8de79f9afde43f664ba4e944ac69161
parentb0de32301a99e94bf85facf9bcaedbf760e32469 (diff)
Fix #504
-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);