yajra / pdo-via-oci8

PHP PDO_OCI functions via OCI8 extension
Other
88 stars 61 forks source link

always empty collection by binding to statement in php 8 #87

Open balukoff opened 3 years ago

balukoff commented 3 years ago

Summary of problem or feature request

i have php 8 and laravel 8. While binding oracle collections in Statement.php there is a check for oci-collection class. But in php 8 class is changed to 'OciCollection', and now we have empty collection anytime

Code snippet of problem

if (strtoupper(get_class($variable)) == 'OCI-COLLECTION') {

must be: $collection_class = 'OCI-COLLECTION'; if(phpversion() >= 8) { $collection_class = 'OCICOLLECTION'; } if (strtoupper(get_class($variable)) == $collection_class) {

System details

yajra commented 3 years ago

Thank you for reporting, can you please submit a pull request on v3/master branch to fix this? Still using PHP 7++ and might not be able to verify this yet.

balukoff commented 3 years ago

no problem, but i have no access to make pull requests

yajra commented 3 years ago

Just fork the repo, checkout or create a patch branch from master, push the changes to your fork and the github can detect if you want to submit a PR.

balukoff commented 3 years ago

ok, i'll try, thanx

balukoff commented 3 years ago

done