Package: gosa
Version: 2.5.2-1
Severity: important
Tags: patch

Hi!

I installed gosa 2.5.2-1 from testing under a PHP5 environment. When trying to change the user's password an error is generated. The include/functions.inc file has an error in function ldap_expired_account(): it uses the $this variable which PHP5 doesn't seem to allow outside of an object context. It looks like an copy-n-paste error to me because using $this isn't necessary in that place.

Attached is a patch which fixes the function.

#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_php5_no_object_this.dpatch by  <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: PHP5 doesn't like 'this' outside of object contexts

@DPATCH@

--- gosa-2.5.2.orig/include/functions.inc       2006-05-31 15:36:29.000000000 
+0200
+++ gosa-2.5.2/include/functions.inc    2006-08-22 18:03:08.000000000 +0200
@@ -367,8 +367,7 @@
 
 function ldap_expired_account($config, $userdn, $username)
 {
-    $this->config= $config;
-    $ldap= $this->config->get_ldap_link();
+    $ldap= $config->get_ldap_link();
     $ldap->cat($userdn);
     $attrs= $ldap->fetch();
     

Reply via email to