cvs: pear /DB_Table/DB Table.php /DB_Table/DB/Table QuickForm.php
| From: | Mark Wiesemann | Date: | Thu, 27 Oct 2005 20:10:16 +0000 |
| Subject: | cvs: pear /DB_Table/DB Table.php /DB_Table/DB/Table QuickForm.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35912@lists.php.net to get a copy of this message | ||
wiesemann Thu Oct 27 16:10:16 2005 EDT
Modified files:
/pear/DB_Table/DB/Table QuickForm.php
/pear/DB_Table/DB Table.php
Log:
more "undefined index" and "allow null instead of empty array" fixes
http://cvs.php.net/diff.php/pear/DB_Table/DB/Table/QuickForm.php?r1=1.29&r2=1.30&ty=u
Index: pear/DB_Table/DB/Table/QuickForm.php
diff -u pear/DB_Table/DB/Table/QuickForm.php:1.29 pear/DB_Table/DB/Table/QuickForm.php:1.30
--- pear/DB_Table/DB/Table/QuickForm.php:1.29 Thu Oct 27 15:46:15 2005
+++ pear/DB_Table/DB/Table/QuickForm.php Thu Oct 27 16:10:08 2005
@@ -12,7 +12,7 @@
*
* @license http://www.gnu.org/copyleft/lesser.html LGPL
*
-* @version $Id: QuickForm.php,v 1.29 2005/10/27 19:46:15 wiesemann Exp $
+* @version $Id: QuickForm.php,v 1.30 2005/10/27 20:10:08 wiesemann Exp $
*
*/
@@ -821,6 +821,13 @@
// values, in which case the type is 'select')
if (! isset($col['qf_type'])) {
+ // if $col['type'] is not set, set it to null
+ // ==> in the switch statement below, the
+ // default case will be used
+ if (!isset($col['type'])) {
+ $col['type'] = null;
+ }
+
switch ($col['type']) {
case 'boolean':
http://cvs.php.net/diff.php/pear/DB_Table/DB/Table.php?r1=1.39&r2=1.40&ty=u
Index: pear/DB_Table/DB/Table.php
diff -u pear/DB_Table/DB/Table.php:1.39 pear/DB_Table/DB/Table.php:1.40
--- pear/DB_Table/DB/Table.php:1.39 Thu Oct 27 15:46:11 2005
+++ pear/DB_Table/DB/Table.php Thu Oct 27 16:10:14 2005
@@ -19,7 +19,7 @@
*
* @license http://www.gnu.org/copyleft/lesser.html LGPL
*
-* @version $Id: Table.php,v 1.39 2005/10/27 19:46:11 wiesemann Exp $
+* @version $Id: Table.php,v 1.40 2005/10/27 20:10:14 wiesemann Exp $
*
*/
@@ -1063,6 +1063,9 @@
$start = null, $count = null)
{
// does the SQL SELECT key exist?
+ if (is_null($this->sql)) {
+ $this->sql = array();
+ }
$tmp = array_keys($this->sql);
if (! in_array($sqlkey, $tmp)) {
return $this->throwError(