cvs: pear /Structures_DataGrid package2-ds-array.xml /Structures_DataGrid/DataGrid/DataSource Array.php
| From: | Mark Wiesemann | Date: | Wed, 24 Jan 2007 19:55:53 +0000 |
| Subject: | cvs: pear /Structures_DataGrid package2-ds-array.xml /Structures_DataGrid/DataGrid/DataSource Array.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-44373@lists.php.net to get a copy of this message | ||
wiesemann Wed Jan 24 19:55:53 2007 UTC
Modified files:
/pear/Structures_DataGrid package2-ds-array.xml
/pear/Structures_DataGrid/DataGrid/DataSource Array.php
Log:
- Bug #9914: removed the (wrong) assumption that always an array index 0 exists
(thanks to Rob, rjbarbour at gmail dot com)
- update changelog and prepare for release
http://cvs.php.net/viewvc.cgi/pear/Structures_DataGrid/package2-ds-array.xml?r1=1.8&r2=1.9&diff_format=u
Index: pear/Structures_DataGrid/package2-ds-array.xml
diff -u pear/Structures_DataGrid/package2-ds-array.xml:1.8
pear/Structures_DataGrid/package2-ds-array.xml:1.9
--- pear/Structures_DataGrid/package2-ds-array.xml:1.8 Sat Dec 16 15:54:43 2006
+++ pear/Structures_DataGrid/package2-ds-array.xml Wed Jan 24 19:55:53 2007
@@ -27,10 +27,10 @@
<email>wiesemann@php.net</email>
<active>yes</active>
</lead>
- <date>2006-12-16</date>
- <time>17:00:00</time>
+ <date>2007-01-24</date>
+ <time>20:55:00</time>
<version>
- <release>0.1.1</release>
+ <release>0.1.2</release>
<api>0.1.0</api>
</version>
<stability>
@@ -39,10 +39,8 @@
</stability>
<license uri="http://opensource.org/licenses/bsd-license.php">New
BSD</license>
<notes>
-- performance optimization: when PHP >= 5.1.0 is installed, its native
- array_intersect_key() function is now used instead of an emulation of this
- function in PHP code
-- this package is now licensed under the New BSD license
+- Bug #9914: removed the (wrong) assumption that always an array index 0 exists
+ (thanks to Rob, rjbarbour at gmail dot com)
</notes>
<contents>
<dir name="/">
http://cvs.php.net/viewvc.cgi/pear/Structures_DataGrid/DataGrid/DataSource/Array.php?r1=1.29&r2=1.30&diff_format=u
Index: pear/Structures_DataGrid/DataGrid/DataSource/Array.php
diff -u pear/Structures_DataGrid/DataGrid/DataSource/Array.php:1.29
pear/Structures_DataGrid/DataGrid/DataSource/Array.php:1.30
--- pear/Structures_DataGrid/DataGrid/DataSource/Array.php:1.29 Mon Jan 1 10:31:18 2007
+++ pear/Structures_DataGrid/DataGrid/DataSource/Array.php Wed Jan 24 19:55:53 2007
@@ -35,9 +35,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * CSV file id: $Id: Array.php,v 1.29 2007/01/01 10:31:18 wiesemann Exp $
+ * CSV file id: $Id: Array.php,v 1.30 2007/01/24 19:55:53 wiesemann Exp $
*
- * @version $Revision: 1.29 $
+ * @version $Revision: 1.30 $
* @package Structures_DataGrid_DataSource_Array
* @category Structures
* @license http://opensource.org/licenses/bsd-license.php
New BSD License
@@ -50,7 +50,7 @@
*
* This class is a data source driver for a 2D Array
*
- * @version $Revision: 1.29 $
+ * @version $Revision: 1.30 $
* @author Olivier Guilyardi <olivier@samalyse.com>
* @author Andrew Nagy <asnagy@webitecture.org>
* @author Mark Wiesemann <wiesemann@php.net>
@@ -117,7 +117,8 @@
function &fetch($offset = 0, $len = null)
{
if ($this->_ar && !$this->_options['fields']) {
- $this->setOptions(array('fields' => array_keys($this->_ar[0])));
+ $firstElement = array_slice($this->_ar, 0, 1);
+ $this->setOptions(array('fields' => array_keys($firstElement[0])));
}
// slicing