View Issue Details

IDProjectCategoryView StatusLast Update
0013331mantisbtldappublic2014-09-23 18:05
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.6 
Target Version1.2.9Fixed in Version1.2.9 
Summary0013331: Email lookup against non-existing LDAP account displays warning
Description

The following warning appears when displaying a bug reported reported by and/or assigned to a user that does not exist in LDAP:

SYSTEM NOTICE: Undefined offset: 0

Steps To Reproduce
  1. set $g_display_errors E_NOTICE = 'inline' (note: that is not the MantisBT default)
  2. Configure for LDAP authentication with AD using "g_use_ldap_realname" and "g_use_ldap_email" = ON.
  3. Create valid user from LDAP
  4. Report a bug as this user, and assign the bug to him
  5. Change username to invalid LDAP user
  6. Go to View Issue Details page for bug created in step 3: http://yourmantis/view.php?id=xxx
  7. Look at the Reporter and Assigned To fields
Additional Information

In releases prior to fixing 0012960 (< 1.2.6), the warning is different, and appears also with default $g_display_errors settings:

SYSTEM WARNING: array_key_exists() expects parameter 2 to be array, null given

TagsNo tags attached.

Relationships

related to 0012960 closedrombert Email / Realname lookups against LDAP spew warning when account is not in LDAP 
related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 
has duplicate 0014001 closedvboctor LDAP "SYSTEM NOTICE: Undefined index 0." when attempt to retrieve email for user that doesn't exist 

Activities

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036303

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master-1.2.x 40807864

2011-09-19 23:04

dregad


Details Diff
Fix error handling in ldap_get_field_from_username

When successful, ldap_get_entries always returns an array with at least
one element inside (the count), so the check for no matches was always
successful even when no values were retrieved from LDAP.

Fixes 0013331
Affected Issues
0013331
mod - core/ldap_api.php Diff File

MantisBT: master 79afb164

2011-09-19 23:04

dregad


Details Diff
Fix error handling in ldap_get_field_from_username

When successful, ldap_get_entries always returns an array with at least
one element inside (the count), so the check for no matches was always
successful even when no values were retrieved from LDAP.

Fixes 0013331
Affected Issues
0013331
mod - core/ldap_api.php Diff File