diff options
author | xue <> | 2006-01-17 23:58:54 +0000 |
---|---|---|
committer | xue <> | 2006-01-17 23:58:54 +0000 |
commit | 54900d0145dfda07bde40dc6e1f0b31935b55444 (patch) | |
tree | c34892281f5ffa9f3c907e5ef48c05720707ef5d /framework/Collections/TPagedDataSource.php | |
parent | 3ea0de54c63f5f9ed02e259a789b01952041cfbd (diff) |
Diffstat (limited to 'framework/Collections/TPagedDataSource.php')
-rw-r--r-- | framework/Collections/TPagedDataSource.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/Collections/TPagedDataSource.php b/framework/Collections/TPagedDataSource.php index 5632e778..71e7c9e6 100644 --- a/framework/Collections/TPagedDataSource.php +++ b/framework/Collections/TPagedDataSource.php @@ -42,8 +42,10 @@ class TPagedDataSource extends TComponent implements IteratorAggregate {
if(!($value instanceof TMap) && !($value instanceof TList))
{
- if(is_array($value) || ($value instanceof Traversable))
+ if(is_array($value))
$value=new TMap($value);
+ else if($value instanceof Traversable)
+ $value=new TList($value);
else if($value!==null)
throw new TInvalidDataTypeException('pageddatasource_datasource_invalid');
}
|