This causes test coverage failure. For example here.
https://www.drupal.org/pift-ci-job/209655

@johnbarclay mentions it here.
https://www.drupal.org/node/1115704#comment-4530148

So it should be defined.

Comments

queenvictoria created an issue. See original summary.

queenvictoria’s picture

Assigned: Unassigned » larowlan
StatusFileSize
new445 bytes

@larowlan it would be super handy if you reviewed this because then we'd be that much closer to our tests passing.

Status: Needs review » Needs work

The last submitted patch, 2: ldap_servers-define-deref-never-2685607-1-7.x-2-x.diff, failed testing.

larowlan’s picture

Assigned: larowlan » Unassigned
Status: Needs work » Reviewed & tested by the community

Looks good to me
tests++

queenvictoria’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Committed thanks!

enriqe’s picture

Maybe it's related:

Notice: Constant LDAP_DEREF_NEVER already defined in include_once() (line 96 of /var/www/sites/all/modules/ldap/ldap_servers/ldap_servers.module).

Start apearing after yesterday update

Added this condition in the meantime:

if (!defined('LDAP_DEREF_NEVER')) define('LDAP_DEREF_NEVER', 0x25);

CORE 7.43
LDAP 7.x-2.0-beta8+17-dev (2016-Mar-13)

MySQL 5.6.24

larowlan’s picture

Status: Closed (fixed) » Needs work
larowlan’s picture

Status: Needs work » Fixed

@queenvictoria had fixed already

jay.dansand’s picture

Status: Fixed » Needs work

Just updated from 7.x-1.0-beta12+17-dev (2013-09-30) to 7.x-1.0-beta12+18-dev (2016-03-13), and this is the only commit in the update.

Immediately after updating, I started receiving Notice: Constant LDAP_DEREF_NEVER already defined in include_once() (line 92 of .../ldap_servers.module). on every page (including in the Seven-themed admin area).

The error persists after forced registry rebuild and clearing all caches. LDAP modules enabled:

  • LDAP Authentication
  • LDAP Authorization
  • LDAP Authorization - Drupal Roles
  • LDAP Profile
  • LDAP Servers

I grepped our entire Drupal codebase and LDAP_DEREF_NEVER is only defined in one place (ldap_servers.module). Many other constants are defined in the same location but don't trigger PHP notices; I have no idea why this particular constant causes the notice and the others don't.

kaosagnt’s picture

http://php.net/manual/en/ldap.constants.php

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

LDAP_DEREF_NEVER (integer)

Therefore 7.x-1.0-beta12+18-dev (2016-03-13) complains as pointed out by others. This needs to be fixed.

freggy’s picture

Bug present in newly released security update 7.x-1.0-beta13. Please fix.

jay.dansand’s picture

Here's a patch rolled against 7.x-1.x-dev.

Drupalized by Jason’s picture

I can confirm patch from #12 is working.

  • larowlan committed f66b521 on 7.x-1.x authored by jay.dansand
    Issue #2685607 by queenvictoria, jay.dansand: LDAP_DEREF_NEVER is not (...
larowlan’s picture

Status: Needs work » Fixed

thanks - fixed, will roll a new 1.x branch release once #1920094: ldap authentication: allow login with null byte - null byte attack is resolved

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.