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

  ID: 68498
  Updated by: sixd@php.net
  Reported by: joe at thook dot me
  Summary: oci_error returns false after ORA-00001
-Status: Open
+Status: Feedback
  Type: Bug
  Package: OCI8 related
  Operating System: CentOS
  PHP Version: 5.5.19
-Assigned To:
+Assigned To: sixd
  Block user comment: N
  Private report: N

  New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

Please give the SQL to create the table and a non-ZFW testcase. Thanks.

Previous Comments:
[2014-11-25 17:15:54] joe at thook dot me

Behavior seems similar to this (resolved) issue: https://bugs.php.net/bug.php?id=42134

Project using ZF1 fails to handle ORA-00001 (Unique constraint violation) warning as an error.

1. SQL statement is sent to Oracle DB adapter using OCI driver (2.0.8)
2. oci_execute() of INSERT statement would cause unique constraint violation, statement fails correctly.
3. PHP Warning is issued (verified with FirePHP and in Apache logs). PHP error_reporting is E_ALL on this development server.
4. ZF1 attempts to generate Exception thus:
    throw new Zend_Db_Statement_Oracle_Exception(oci_error($this->_stmt));
5. oci_error returns false. Exception is not generated correctly because error array is not produced.

Expected result:
When oci_execute() throws ORA-00001 and issues a PHP Warning, oci_error should produce the error array in accordance with PHP's error_reporting setting.

Actual result:
oci_error() returns false despite Warning issued.


Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›
Discussion Overview
groupphp-bugs @
postedNov 25, '14 at 5:16p
activeNov 26, '14 at 1:57p

2 users in discussion

Sixd: 2 posts Joe at thook dot me: 2 posts



site design / logo © 2019 Grokbase