cvs: pear /DB/DB mysqli.php
| From: | Lukas Smith | Date: | Wed, 01 Mar 2006 22:57:53 +0000 |
| Subject: | cvs: pear /DB/DB mysqli.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38813@lists.php.net to get a copy of this message | ||
lsmith Wed Mar 1 22:57:53 2006 UTC
Modified files:
/pear/DB/DB mysqli.php
Log:
- fixed 'len' handling in tableInfo() .. there is a bug in mysqli or the mysqli docs
(bug #5680)
http://cvs.php.net/viewcvs.cgi/pear/DB/DB/mysqli.php?r1=1.69&r2=1.70&diff_format=u
Index: pear/DB/DB/mysqli.php
diff -u pear/DB/DB/mysqli.php:1.69 pear/DB/DB/mysqli.php:1.70
--- pear/DB/DB/mysqli.php:1.69 Fri Mar 4 23:12:36 2005
+++ pear/DB/DB/mysqli.php Wed Mar 1 22:57:52 2006
@@ -19,7 +19,7 @@
* @author Daniel Convissor <danielc@php.net>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: mysqli.php,v 1.69 2005/03/04 23:12:36 danielc Exp $
+ * @version CVS: $Id: mysqli.php,v 1.70 2006/03/01 22:57:52 lsmith Exp $
* @link http://pear.php.net/package/DB
*/
@@ -1015,7 +1015,9 @@
'type' => isset($this->mysqli_types[$tmp->type])
? $this->mysqli_types[$tmp->type]
: 'unknown',
- 'len' => $tmp->max_length,
+ // work around for http://bugs.php.net/?id=36579
+ 'len' => ($tmp->max_length && isset($tmp->length))
+ ? $tmp->max_length : $tmp->length,
'flags' => $flags,
);