-
Notifications
You must be signed in to change notification settings - Fork 36
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
fix fetch args #34
fix fetch args #34
Conversation
Thank @ashnazg for der PR. |
"Argument pear#1 ($value) must be of type Countable|array, bool given" at the end of the query
@ashnazg Thanks for your PR. I pushed a second commit, becuase at the end of the query dataset, oci_fetch_array returns a |
@@ -383,14 +383,24 @@ function fetchInto($result, &$arr, $fetchmode, $rownum = null) | |||
return $this->raiseError(DB_ERROR_NOT_CAPABLE); | |||
} | |||
if ($fetchmode & DB_FETCHMODE_ASSOC) { | |||
$moredata = @oci_fetch_array($result,$arr,OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS); | |||
$arr = @oci_fetch_array($result,OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why silence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think, because of all other PHP oci functions are silent, too. Maybe the DBMS should handle the error messages on its own?
@ashnazg is that right? or what do you thought by silence that function?
There is also another check, if the oci_fetch_array
returns an array and not false.
i don´t have a strong opinion on call it silence or not.
@ashnazg @till what do you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@schengawegga No, that sounds plausible. Otherwise LGTM!
Issue #33 . This fixes the args for
oci_fetch_array
. I tried to keep the same$moredata
logic, based on (what I think is) originalocifetchinto
return behavior of integer of rows fetched.@schengawegga , I'll need you to test this since I don't have the right environment.