summaryrefslogtreecommitdiff
path: root/framework/Collections/TMap.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Collections/TMap.php')
-rw-r--r--framework/Collections/TMap.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/Collections/TMap.php b/framework/Collections/TMap.php
index 73665136..d5a44322 100644
--- a/framework/Collections/TMap.php
+++ b/framework/Collections/TMap.php
@@ -180,7 +180,7 @@ class TMap extends TComponent implements IteratorAggregate,ArrayAccess
foreach($data as $key=>$value)
$this->add($key,$value);
}
- else
+ else if($data!==null)
throw new TInvalidDataTypeException('map_data_not_iterable');
}
@@ -197,7 +197,7 @@ class TMap extends TComponent implements IteratorAggregate,ArrayAccess
foreach($data as $key=>$value)
$this->add($key,$value);
}
- else
+ else if($data!==null)
throw new TInvalidDataTypeException('map_data_not_iterable');
}