|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81088 error in regression test for oci_fetch_object() and oci_fetch_array()
Submitted: 2021-05-28 15:15 UTC Modified: 2021-05-28 21:15 UTC
From: mjetzer dot cdc at gmail dot com Assigned: cmb (profile)
Status: Closed Package: OCI8 related
PHP Version: 8.0.6 OS: Linux RHEL-8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
34 + 7 = ?
Subscribe to this entry?

 [2021-05-28 15:15 UTC] mjetzer dot cdc at gmail dot com
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.


oci8_php_oci_fix (last revision 2021-05-28 15:15 UTC by mjetzer dot cdc at gmail dot com)

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-05-28 15:46 UTC]
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:
 [2021-05-28 15:48 UTC]
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 16:00 UTC]
Automatic comment on behalf of kocsismate
Log: Fixed bug #81088 error in regression test for oci_fetch_object() and oci_fetch_array()
 [2021-05-28 16:00 UTC]
-Status: Open +Status: Closed
 [2021-05-28 16:03 UTC]
-Status: Closed +Status: Verified
 [2021-05-28 16:03 UTC]
Oh, indeed, the stubs[1] are wrong!

[1] <>
 [2021-05-28 21:15 UTC]
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-05-28 21:15 UTC]
Oh, Máté was fast! :)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 04:01:28 2024 UTC