Bug #68498 [NEW]: oci_error returns false after ORA-00001
| From: | joe at thook dot me | Date: | Tue, 25 Nov 2014 17:15:55 +0000 |
| Subject: | Bug #68498 [NEW]: oci_error returns false after ORA-00001 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-188787@lists.php.net to get a copy of this message | ||
From: joe at thook dot me
Operating system: CentOS
PHP version: 5.5.19
Package: OCI8 related
Bug Type: Bug
Bug description:oci_error returns false after ORA-00001
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 bug report at https://bugs.php.net/bug.php?id=68498&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68498&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68498&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68498&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68498&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68498&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68498&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68498&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68498&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68498&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68498&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68498&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68498&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68498&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68498&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68498&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68498&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68498&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68498&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68498&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68498&r=mysqlcfg