Bug #68498 [Opn->Fbk]: oci_error returns false after ORA-00001

From: Date: Wed, 26 Nov 2014 02:38:13 +0000
Subject: Bug #68498 [Opn->Fbk]: oci_error returns false after ORA-00001
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188794@lists.php.net to get a copy of this message
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 Description: ------------ 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68498&edit=1

« previous php.bugs (#188794) next »