-
Notifications
You must be signed in to change notification settings - Fork 267
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
remove error suppression from mssqlnative (and more?) driver #433
base: master
Are you sure you want to change the base?
Conversation
drivers/adodb-mssqlnative.inc.php
Outdated
else | ||
$this->fields = @sqlsrv_fetch_array($this->_queryID,SQLSRV_FETCH_ASSOC); | ||
$this->fields = sqlsrv_fetch_array($this->_queryID,SQLSRV_FETCH_ASSOC); |
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.
$this->fields = sqlsrv_fetch_array($this->_queryID, ($this->fetchMode & ADODB_FETCH_NUM ? SQLSRV_FETCH_BOTH : SQLSRV_FETCH_ASSOC));
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.
Well, you're right, but my focus is on the @
-Operator and any ideas/problems with this.
I may remove the if
/else
condition later.
The philosophy of suppressing all errors has been part of the project from day 1, Although I cannot speak to John Lim's decision as to why this is ,
What should happen is that the $db->debug setting should expose the error to you, and that if it does not, that should be addressed. I think that before removing the error suppression from drivers, You should get a consensus of approval from the community |
Thank you for your answer, but I don't think that suppressing errors is a good idea (there may be exceptions, but not in this case ) :-) . Displaying Errors In Production: Complex Error Trapping: |
@dregad Do you mind considering this PR? Or giving directions what to do next? |
The
@
-Operator suppresses ALL errors and resulted in a script that exited/aborted without any error message because the error (memory limit exceeded) happened within thesqlsrv_fetch_array
function.I did not get the advantage of suppressing the errors and I currently don't see any problems within our application with this.
Any information why the error suppression was introduced?
If you wish, I could remove the error suppression from all other drivers as well.