Bug #54553 [NEW]: OCI-Collection::getelem() Unknown or unsupported type of element
From:
Operating system: Windows XP Professional SP3
PHP version: 5.3.6
Package: OCI8 related
Bug Type: Bug
Bug description:OCI-Collection::getelem() Unknown or unsupported type of element
Description:
------------
function OCI-Collection::getelem() returns "Unknown or unsupported type of
element: 108 when collection returned from oracle sql stored function.
database version is 10g Release 2
Test script:
---------------
SQL:
CREATE TABLE AAAPOKUS2 ("COLUMN1" VARCHAR2(20 BYTE) ) TABLESPACE "USERS" ;
CREATE OR REPLACE TYPE AAATYPE1 AS object ( column1 VARCHAR2(20 CHAR) );
CREATE OR REPLACE TYPE AAATYPE1_TABLE is table of AAATYPE1;
CREATE OR REPLACE FUNCTION FUNCTION3
(
PARAM2 OUT AAATYPE1_TABLE
) RETURN number AS
BEGIN
SELECT AAATYPE1(column1)
bulk collect into PARAM2 FROM
AAAPOKUS1;
RETURN 8;
END FUNCTION3;
PHP:
$query = " BEGIN :v_Return := FUNCTION3(:PARAM2);end;\n";
$s = oci_parse($conn, $query);
$var3 = ' 3';
$collection = oci_new_collection($conn,"AAATYPE1_TABLE","KSM");
oci_bind_by_name($s, ":PARAM2", $collection,-1,OCI_B_NTY);
oci_bind_by_name($s, ":v_Return", $var3);
oci_execute($s, OCI_DEFAULT);
echo($collection->size());
$elem = $collection->getElem(1);
Expected result:
----------------
expected is some values (array of values) returned from stored function
Actual result:
--------------
false
--
Edit bug report at http://bugs.php.net/bug.php?id=54553&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54553&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54553&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54553&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54553&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54553&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54553&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54553&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54553&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54553&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54553&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54553&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54553&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54553&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54553&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54553&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54553&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54553&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54553&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54553&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54553&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54553&r=mysqlcfg
Thread (3 messages)
- richard dot strba at email dot cz