From bd52f8f8433a944b50d79c6d2d4c20cd982c4620 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Thu, 10 May 2007 07:16:11 +0000 Subject: - Fixed issue #10759: Unset implementation broken in array access in datasets and dataset properties --- src/data_container/base.php | 4 ++-- src/interfaces/dataset_property.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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] ); } -- cgit v1.1