Bug #81088 [Ver->Csd]: error in regression test for oci_fetch_object() and oci_fetch_array()
| From: | cmb@php.net | Date: | Fri, 28 May 2021 21:15:48 +0000 |
| Subject: | Bug #81088 [Ver->Csd]: error in regression test for oci_fetch_object() and oci_fetch_array() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-234085@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81088&edit=1
ID: 81088
Updated by: cmb@php.net
Reported by: mjetzer dot cdc at gmail dot com
Summary: error in regression test for oci_fetch_object() and
oci_fetch_array()
-Status: Verified
+Status: Closed
Type: Bug
Package: OCI8 related
Operating System: Linux RHEL-8
PHP Version: 8.0.6
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Oh, Máté was fast! :)
Previous Comments:
------------------------------------------------------------------------
[2021-05-28 16:03:24] cmb@php.net
Oh, indeed, the stubs[1] are wrong!
[1] <https://github.com/php/php-src/blob/PHP-8.0/ext/oci8/oci8.stub.php#L253>
------------------------------------------------------------------------
[2021-05-28 16:00:49] git@php.net
Automatic comment on behalf of kocsismate
Revision: https://github.com/php/php-src/commit/a0af84bebd6e86d3c285ceb51b30fb649fff10ce
Log: Fixed bug #81088 error in regression test for oci_fetch_object() and oci_fetch_array()
------------------------------------------------------------------------
[2021-05-28 15:48:06] kocsismate@php.net
Thanks for the report and the patch! Finally, I've created a PR to fix the issue because the
arginfo file is in fact generated from oci8.stub.php.
------------------------------------------------------------------------
[2021-05-28 15:46:13] kocsismate@php.net
The following pull request has been associated:
Patch Name: Fix bug #81088 error in regression test for oci_fetch_object() and oci_fetch_array()
On GitHub: https://github.com/php/php-src/pull/7072
Patch: https://github.com/php/php-src/pull/7072.patch
------------------------------------------------------------------------
[2021-05-28 15:15:18] mjetzer dot cdc at gmail dot com
Description:
------------
ext/reflection/tests/internal_parameter_default_value/check_all.phpt fails with the following:
oci_fetch_object: Undefined constant "PHP_OCI_ASSOC"
oci_fetch_array: Undefined constant "PHP_OCI_BOTH"
I see that most of the oci_* functions in ext/oci8/oci8_arginfo.h with similar default arguments use
the OCI_* version of the constant, rather than the PHP_OCI_* versions, but oci_fetch_object() and
oci_fetch_array() use the PHP_OCI_* version of the constants.
Changing the oci8_arginfo.h declarations to use only the OCI_* version of the constants allows the
regression test to run successfully.
We do not use any of the oci_* functions directly, only via ADOdb, which provides all necessary
arguments and does not default any arguments, so we have no ready means of testing these functions
(other than by running the regression tests).
These constants are declared using PHP_OCI_* in the current versions of the files in git.
Test script:
---------------
Run regression test as TEST_PHP_EXECUTABLE=/PATH/TO/sapi/cli/php sapi/cli/php -n -c tmp-php.ini
run-tests.php --no-clean ext/reflection/tests/internal_parameter_default_value/check_all.phpt
Expected result:
----------------
Regression test runs successfully.
Actual result:
--------------
Regression test fails with errors described in the Description.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81088&edit=1