Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected P1010 Undefined function error for oci_set_prefetch_lob #2873

Open
mattjson opened this issue May 1, 2024 · 0 comments
Open

Unexpected P1010 Undefined function error for oci_set_prefetch_lob #2873

mattjson opened this issue May 1, 2024 · 0 comments
Labels
Milestone

Comments

@mattjson
Copy link

mattjson commented May 1, 2024

Describe the bug

When I use PHP 8.2, I can call oci_set_prefetch_lob, but Intelphense reports the following error: P1010 Undefined function

To Reproduce

  1. Open VS Code
  2. Set Intelephense PHP version to 8.2
  3. Save the following code snippet as a file

Example from: https://www.php.net/manual/en/function.oci-set-prefetch-lob.php

<?php

$conn = oci_connect('hr', 'welcome', 'localhost/XE');

$stid = oci_parse($conn, 'SELECT myclob FROM mytable');
oci_set_prefetch_lob($stid, 100000);  // Set before calling oci_execute()
oci_execute($stid);

echo "<table border='1'>\n";
while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS)) {
    echo "<tr>\n";
    foreach ($row as $item) {
        echo "    <td>".($item !== null ? htmlentities($item, ENT_QUOTES) : "&nbsp;")."</td>\n";
    }
    echo "</tr>\n";
}
echo "</table>\n";

oci_free_statement($stid);
oci_close($conn);

?>

Expected behavior

VS Code shows no error

Screenshots

image

Platform and version

Windows
PHP Intelephense
v1.10.4

@mattjson mattjson changed the title Invalid P1010 Undefined function for oci_set_prefetch_lob with PHP 8.2 Unexpected P1010 Undefined function error for oci_set_prefetch_lob May 1, 2024
@bmewburn bmewburn added the stubs label May 2, 2024
@bmewburn bmewburn added this to the 1.11.0 milestone May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants