Edit report at https://bugs.php.net/bug.php?id=59985&edit=1

 ID:                 59985
 Updated by:         [email protected]
 Reported by:        sss at rdw dot ru
 Summary:            No ORA-error message when OCI_NO_DATA
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            OCI8 related
 Operating System:   linux
 PHP Version:        5.3.6
-Assigned To:        
+Assigned To:        sixd
 Block user comment: N
 Private report:     N

 New Comment:

The error stack was always available after calling oci_error($stid).

I've merged a change to OCI8 so the default warning now includes the error 
stack 
too.


Previous Comments:
------------------------------------------------------------------------
[2011-11-10 22:46:52] [email protected]

Automatic comment from SVN on behalf of sixd
Revision: http://svn.php.net/viewvc/?view=revision&revision=319015
Log: OCI8: Fixed bug #59985 (show normal warning text for OCI_NO_DATA).  Sync 
NEWS.

------------------------------------------------------------------------
[2011-10-03 07:22:41] sss at rdw dot ru

Description:
------------
When pl/sql trow exeption ORA-01403
php don't show this Warning message.




Reproduce code:
---------------
$x = '';
$conn = oci_connect("scott", "tiger", "mydb");

//ORA-01403 bad Warning message (no pl/sql trace)
$stid = oci_parse( $conn, 'Begin Select 1 Into :x From dual Where 1 = 2; End;' 
);
oci_bind_by_name($stid, ":x", $x);
oci_execute($stid);


//ORA-01476 good Warning message
$stid = oci_parse( $conn, 'Begin Select 1/0 Into :x From dual; End;' );
oci_bind_by_name($stid, ":x", $x);
oci_execute($stid);


Expected result:
----------------
Warning: oci_execute() [function.oci-execute]: ORA-01403: no data found 
ORA-06512: at line 1 in /www/docs/rdw/bootstrap.php on line 8

Warning: oci_execute() [function.oci-execute]: ORA-01476: divisor is equal to 
zero ORA-06512: at line 1 in /www/docs/rdw/bootstrap.php on line 13

Actual result:
--------------
Warning: oci_execute() [function.oci-execute]: OCI_NO_DATA in 
/www/docs/rdw/bootstrap.php on line 8

Warning: oci_execute() [function.oci-execute]: ORA-01476: divisor is equal to 
zero ORA-06512: at line 1 in /www/docs/rdw/bootstrap.php on line 13


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



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

Reply via email to