From 4827f5c5d76fcca43b181dba01681baa2c4dd579 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Thu, 10 Nov 2011 22:47:00 +0000 Subject: [PATCH] OCI8: Fixed bug #59985 (show normal warning text for OCI_NO_DATA). Sync NEWS. --- NEWS | 7 ++++++- ext/oci8/oci8.c | 2 +- ext/oci8/package.xml | 3 ++- ext/oci8/tests/array_bind_003.phpt | 4 +++- ext/oci8/tests/array_bind_004.phpt | 4 +++- ext/oci8/tests/pecl_bug16842.phpt | 3 ++- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 34557874e3..4242fc7b91 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,10 @@ PHP NEWS . Fixed bug #60227 (header() cannot detect the multi-line header with CR(0x0D)). (rui) +- Oracle Database extension (OCI8): + . Fixed bug #59985 (show normal warning text for OCI_NO_DATA) + (Chris Jones) + 11 Nov 2011, PHP 5.4.0 RC1 - General improvements: . Changed silent conversion of array to string to produce a notice. (Patrick) @@ -33,8 +37,9 @@ PHP NEWS is_a and is_subclass_of). (alan_k) - Oracle Database extension (OCI8): - . Increased maxium Oracle error message buffer length for new 11.2.0.3 size + . Increased maximum Oracle error message buffer length for new 11.2.0.3 size (Chris Jones) + . Improve internal initalization failure error messages (Chris Jones) - SPL extension . Reverted changes that required constructor overrides to invoke the parent diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index b943c28454..809ff816ae 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -1632,9 +1632,9 @@ sb4 php_oci_error(OCIError *err_p, sword status TSRMLS_DC) php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_NEED_DATA"); break; case OCI_NO_DATA: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_NO_DATA"); errcode = php_oci_fetch_errmsg(err_p, &errbuf TSRMLS_CC); if (errbuf) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", errbuf); efree(errbuf); } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_NO_DATA: failed to fetch error message"); diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml index f086869dea..bcad81b197 100644 --- a/ext/oci8/package.xml +++ b/ext/oci8/package.xml @@ -46,7 +46,8 @@ http://pear.php.net/dtd/package-2.0.xsd"> PHP - Increased maximum possible Oracle DB error message length + Fixed bug #59985 (show normal warning text for OCI_NO_DATA) + Increased maximum Oracle error message buffer length for new Oracle 11.2.0.3 size Improve internal initalization failure error messages diff --git a/ext/oci8/tests/array_bind_003.phpt b/ext/oci8/tests/array_bind_003.phpt index 94bce02e31..0875c694f5 100644 --- a/ext/oci8/tests/array_bind_003.phpt +++ b/ext/oci8/tests/array_bind_003.phpt @@ -62,7 +62,9 @@ var_dump($array); echo "Done\n"; ?> --EXPECTF-- -Warning: oci_execute(): OCI_NO_DATA in %s on line %d +Warning: oci_execute(): ORA-01403: %s +ORA-06512: at "SYSTEM.ARRAYBINDPKG1", line %d +ORA-06512: at line %d in %sarray_bind_003.php on line %d array(4) { [0]=> string(9) "06-DEC-05" diff --git a/ext/oci8/tests/array_bind_004.phpt b/ext/oci8/tests/array_bind_004.phpt index 1eb1fc7fac..df74025d70 100644 --- a/ext/oci8/tests/array_bind_004.phpt +++ b/ext/oci8/tests/array_bind_004.phpt @@ -62,7 +62,9 @@ var_dump($array); echo "Done\n"; ?> --EXPECTF-- -Warning: oci_execute(): OCI_NO_DATA in %s on line %d +Warning: oci_execute(): ORA-01403: %s +ORA-06512: at "SYSTEM.ARRAYBINDPKG1", line %d +ORA-06512: at line %d in %sarray_bind_004.php on line %d array(0) { } Done diff --git a/ext/oci8/tests/pecl_bug16842.phpt b/ext/oci8/tests/pecl_bug16842.phpt index dbf7e6bb83..ca24d0d276 100644 --- a/ext/oci8/tests/pecl_bug16842.phpt +++ b/ext/oci8/tests/pecl_bug16842.phpt @@ -39,7 +39,8 @@ oci_close($c); Test 1 Raises NO_DATA_FOUND -Warning: oci_execute(): OCI_NO_DATA in %s on line 11 +Warning: oci_execute(): ORA-01403: %s +ORA-06512: at line %d in %specl_bug16842.php on line %d bool(false) array(4) { ["code"]=> -- 2.40.0