cvs: pear /HTML_Table/Table Storage.php

From: Date: Tue, 25 Oct 2005 12:56:35 +0000
Subject: cvs: pear /HTML_Table/Table Storage.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35849@lists.php.net to get a copy of this message
wiesemann Tue Oct 25 08:56:35 2005 EDT Modified files: /pear/HTML_Table/Table Storage.php Log: Bugfix: return PEAR_Error object in getCellContents when cell does not exist (#Note: This was "broken" before my code changes.) http://cvs.php.net/diff.php/pear/HTML_Table/Table/Storage.php?r1=1.4&r2=1.5&ty=u Index: pear/HTML_Table/Table/Storage.php diff -u pear/HTML_Table/Table/Storage.php:1.4 pear/HTML_Table/Table/Storage.php:1.5 --- pear/HTML_Table/Table/Storage.php:1.4 Tue Oct 25 07:50:51 2005 +++ pear/HTML_Table/Table/Storage.php Tue Oct 25 08:56:33 2005 @@ -22,7 +22,7 @@ * @author Bertrand Mansion <bmansion@mamasam.com> * @copyright 2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Storage.php,v 1.4 2005/10/25 11:50:51 wiesemann Exp $ + * @version CVS: $Id: Storage.php,v 1.5 2005/10/25 12:56:33 wiesemann Exp $ * @link http://pear.php.net/package/HTML_Table */ @@ -381,6 +381,10 @@ function getCellContents($row, $col) { if (isset($this->_structure[$row][$col]) && $this->_structure[$row][$col] == '__SPANNED__') return; + if (!isset($this->_structure[$row][$col])) { + return PEAR::raiseError('Invalid table cell reference[' . + $row . '][' . $col . '] in HTML_Table::getCellContents'); + } return $this->_structure[$row][$col]['contents']; }

« previous php.pear.cvs (#35849) next »