diff options
Diffstat (limited to 'src/datasets')
-rw-r--r-- | src/datasets/array.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/datasets/array.php b/src/datasets/array.php index 3340cd0..ee7f0df 100644 --- a/src/datasets/array.php +++ b/src/datasets/array.php @@ -44,10 +44,16 @@ class ezcGraphArrayDataSet extends ezcGraphDataSet throw new ezcGraphInvalidArrayDataSourceException( $data ); } + $this->data = array(); foreach ( $data as $key => $value ) { $this->data[$key] = $value; } + + if ( !count( $this->data ) ) + { + throw new ezcGraphInvalidDataException( 'Data sets should contain some values.' ); + } } /** |