php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25067 DB_oci8::tableInfo() should return lowercase metadata when optimize=portability
Submitted: 2003-08-13 00:31 UTC Modified: 2003-08-28 09:12 UTC
From: xia at silvia dot com Assigned: cox (profile)
Status: Closed Package: PEAR related
PHP Version: 4.3.2 OS: FreeBSD_4.8-RELEASE
Private report: No CVE-ID: None
 [2003-08-13 00:31 UTC] xia at silvia dot com
Description:
------------
If PEAR DB_oci8::options('optimize' => 'portability'), DB_oci8::tableInfo() should return lower-case metadata.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-15 12:54 UTC] 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-20 08:06 UTC] xia at silvia dot com
Thanks nicos, 
But, not keys but values should be lower-cased.
(need array_change_value_case()...?)
 [2003-08-28 09:12 UTC] cox@php.net
Fixed in CVS. Could you please download the lastest CVS version of the oci8.php file and try if all it's ok?
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Nov 28 12:03:13 2021 UTC