Fatal error: Can't use function return value in write context in simple_ldap/simple_ldap_user/simple_ldap_user.module on line 284

This is in the simple_ldap_user_user_delete() function, but I'm not actually deleting a user, so I guess this qualifies as a parse error in PHP 5.3.20 and 5.4.10.

The problem is this line:

if (empty(simple_ldap_user_variable_get('simple_ldap_user_delete_from_ldap'))) {

You can't use the return value of a function call as the argument for empty(), it has to be a variable.

CommentFileSizeAuthor
#1 simple_ldap-fix-2205733-1.patch899 bytesBrockBoland
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BrockBoland’s picture

Status: Active » Needs review
FileSize
899 bytes

Patch attached. I switched it to use the same check that's being used in the 7.x-2.x branch. My editor also trimmed some trailing white space on an unrelated line.

This was introduced in http://drupalcode.org/project/simple_ldap.git/commit/b96be45

John Franklin’s picture

Status: Needs review » Fixed

Patch applied.

Status: Fixed » Closed (fixed)

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