oh, i created ticket too fast )
this variable has no effect, 'cause there are several error_reporting settings in the code already.
maybe create one error reporting setting for all code?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are two sequences of code where the error_reporting() value
is briefly changed to 0, then back to its previous setting:
$old_error_reporting=error_reporting();
error_reporting(0);
// Do LDAP operation that might fail
error_reporting($old_error_reporting);
// Do something with the result of the LDAP operation,
// if it succeeded
The two code sequences in question are:
in index.php - displays LDAP records if successfully returned
from a call to ldap_list() or ldap_search()
in function log_on_to_directory($ldap_link), utils.php - attempt
ldap_bind() as the appropriate LDAP user and returns whether
or not it worked
These LDAP functions all return false if there was an error. As the original value of error_reporting() is saved and restored each time, I would expect your debugging to work as you wish other than within these small sections.
The code would be stylistically better (in my opinion) if the
above LDAP functions were prefixed with @ (see: http://www.php.net//manual/en/language.operators.errorcontrol.php)
rather than changing the value of error_reporting(), and I would
be inclined to do this for the next version. Would this change
sufficiently address your debugging issue?
Last edit: James Turner 2014-06-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
oh, i created ticket too fast )
this variable has no effect, 'cause there are several error_reporting settings in the code already.
maybe create one error reporting setting for all code?
There are two sequences of code where the error_reporting() value
is briefly changed to 0, then back to its previous setting:
The two code sequences in question are:
in index.php - displays LDAP records if successfully returned
from a call to ldap_list() or ldap_search()
in function log_on_to_directory($ldap_link), utils.php - attempt
ldap_bind() as the appropriate LDAP user and returns whether
or not it worked
These LDAP functions all return false if there was an error. As the original value of error_reporting() is saved and restored each time, I would expect your debugging to work as you wish other than within these small sections.
The code would be stylistically better (in my opinion) if the
above LDAP functions were prefixed with @ (see:
http://www.php.net//manual/en/language.operators.errorcontrol.php)
rather than changing the value of error_reporting(), and I would
be inclined to do this for the next version. Would this change
sufficiently address your debugging issue?
Last edit: James Turner 2014-06-22
Cool, thanks!
All code that changes error_reporting() has been removed as of version 0.13.