ID:               42134
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         OCI8 related
 Operating System: n/a
 PHP Version:      5CVS-2007-07-28 (CVS)
 New Comment:

http://dev.daylessday.org/diff/bug42134.diff
try this patch plz.


Previous Comments:
------------------------------------------------------------------------

[2007-07-28 21:40:16] [EMAIL PROTECTED]

Description:
------------
Collection creation errors are displayed if display_errors and
error_reporting are set appropriately, but a subsequent oci_error()
returns false, so error trapping won't display the problem.

After OCITypeByName() fails in php_oci_collection_create(),
php_oci_collection_close() is called.  The line
  zend_list_delete(collection->connection->rsrc_id)
causes the subsequent oci_error() function line
  connection = (php_oci_connection *) zend_fetch_resource(&arg
TSRMLS_CC, -1, NULL, NULL, 1, le_connection);
to return a null pointer.


Reproduce code:
---------------
<?php
$c = oci_connect('hr', 'hrpwd', '//localhost/XE');

$collection = oci_new_collection($c, "BOGUS");
if (!$collection) {
    $m = oci_error($c);
    echo "Error: ", $m["message"];
}
?>

Expected result:
----------------
  Error: OCI-22303: type ""."BOGUS" not found

Actual result:
--------------
  Error:


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42134&edit=1

Reply via email to