From e7622f08814c6c7a1166addf9bc23c5780bd74b0 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 4 Feb 2006 05:05:03 +0000 Subject: Fixed a bug about performing databind with an empty dataset. --- framework/Web/UI/WebControls/TDataBoundControl.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'framework/Web/UI/WebControls/TDataBoundControl.php') diff --git a/framework/Web/UI/WebControls/TDataBoundControl.php b/framework/Web/UI/WebControls/TDataBoundControl.php index 026d2e86..b7294383 100644 --- a/framework/Web/UI/WebControls/TDataBoundControl.php +++ b/framework/Web/UI/WebControls/TDataBoundControl.php @@ -196,10 +196,7 @@ abstract class TDataBoundControl extends TWebControl $this->dataBindProperties(); $this->onDataBinding(null); $data=$this->getData(); - if($data instanceof Traversable) - $this->performDataBinding($data); - else if($data!==null) - throw new TInvalidDataTypeException('databoundcontrol_data_nontraversable'); + $this->performDataBinding($data); $this->setIsDataBound(true); $this->onDataBound(null); } -- cgit v1.2.3