summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-05-10 07:16:11 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-05-10 07:16:11 +0000
commitbd52f8f8433a944b50d79c6d2d4c20cd982c4620 (patch)
treed3f3b4a24fd9f826523a3942a6802db44c90090a /src
parentcabd4817dc80cca8ddeb93b40e0cd18b6b3768de (diff)
downloadzetacomponents-graph-bd52f8f8433a944b50d79c6d2d4c20cd982c4620.zip
zetacomponents-graph-bd52f8f8433a944b50d79c6d2d4c20cd982c4620.tar.gz
- Fixed issue #10759: Unset implementation broken in array access in datasets
and dataset properties
Diffstat (limited to 'src')
-rw-r--r--src/data_container/base.php4
-rw-r--r--src/interfaces/dataset_property.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/data_container/base.php b/src/data_container/base.php
index de2424d..6a78d8a 100644
--- a/src/data_container/base.php
+++ b/src/data_container/base.php
@@ -81,7 +81,7 @@ class ezcGraphChartDataContainer implements ArrayAccess, Iterator, Countable
*/
public function offsetGet( $key )
{
- if ( !isset( $key ) )
+ if ( !isset( $this->data[$key] ) )
{
throw new ezcGraphNoSuchDataSetException( $key );
}
@@ -123,7 +123,7 @@ class ezcGraphChartDataContainer implements ArrayAccess, Iterator, Countable
*/
public function offsetUnset( $key )
{
- if ( !isset( $key ) )
+ if ( !isset( $this->data[$key] ) )
{
throw new ezcGraphNoSuchDataSetException( $key );
}
diff --git a/src/interfaces/dataset_property.php b/src/interfaces/dataset_property.php
index bfff3e6..0550f85 100644
--- a/src/interfaces/dataset_property.php
+++ b/src/interfaces/dataset_property.php
@@ -159,7 +159,7 @@ abstract class ezcGraphDataSetProperty implements ArrayAccess
*/
final public function offsetUnset( $key )
{
- if ( isset( $this->dataset[$value] ) )
+ if ( isset( $this->dataset[$key] ) )
{
unset( $this->dataValue[$key] );
}
OpenPOWER on IntegriCloud