#25067 [Ana]: DB_oci8::tableInfo() should return lowercase metadata when optimize=portability
| From: | xia at silvia dot com | Date: | Wed, 20 Aug 2003 13:06:39 +0000 |
| Subject: | #25067 [Ana]: DB_oci8::tableInfo() should return lowercase metadata when optimize=portability | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20152@lists.php.net to get a copy of this message | ||
ID: 25067
User updated by: xia at silvia dot com
Reported By: xia at silvia dot com
Status: Analyzed
Bug Type: PEAR related
Operating System: FreeBSD_4.8-RELEASE
PHP Version: 4.3.2
Assigned To: cox
New Comment:
Thanks nicos,
But, not keys but values should be lower-cased.
(need array_change_value_case()...?)
Previous Comments:
------------------------------------------------------------------------
[2003-08-15 12:54:29] nicos@php.net
Here is the patch:
Can anyone review it ?
Index: DB/oci8.php
===================================================================
RCS file: /repository/pear/DB/DB/oci8.php,v
retrieving revision 1.11
diff -u -u -r1.11 oci8.php
--- DB/oci8.php 22 Jul 2003 21:54:16 -0000 1.11
+++ DB/oci8.php 15 Aug 2003 17:52:51 -0000
@@ -757,7 +757,11 @@
return $this->raiseError(DB_ERROR_NOT_CAPABLE);
}
}
- return $res;
+ if ($this->options['optimize'] == 'portability') {
+ return array_change_key_case($res, CASE_LOWER);
+ } else {
+ return $res;
+ }
}
// }}}
------------------------------------------------------------------------
[2003-08-13 00:31:28] xia at silvia dot com
Description:
------------
If PEAR DB_oci8::options('optimize' => 'portability'),
DB_oci8::tableInfo() should return lower-case metadata.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25067&edit=1