Skip to content

Commit

Permalink
Issue #11100: Avoid warnings when the ldap simulation files is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
rombert committed Nov 1, 2009
1 parent a6529bb commit 94f40e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/ldap_api.php
Expand Up @@ -362,6 +362,10 @@ function ldap_simulation_get_user( $p_username ) {
$t_filename = config_get( 'ldap_simulation_file_path' );

$t_lines = file( $t_filename );
if ( $t_lines === false ) {
log_event( LOG_LDAP, "ldap_simulation_get_user: could not read simulation data from $t_filename." );
return null;
}

foreach ( $t_lines as $t_line ) {
$t_line = trim( $t_line, " \t\r\n" );
Expand Down

0 comments on commit 94f40e2

Please sign in to comment.