summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 99273fc)
raw | patch | inline | side by side (parent: 99273fc)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 May 2005 09:47:27 +0000 (09:47 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 May 2005 09:47:27 +0000 (09:47 +0000) |
* Added workaround for error handler in PHP5
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@272 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@272 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_ldap.inc | patch | blob | history | |
include/functions.inc | patch | blob | history |
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index f3650a55eb814473e41f375920ada914c7578392..74020d3c9e3f455f334a1ad320cbdfb5efc316d9 100644 (file)
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
if ($basedn == "")
$basedn = $this->basedn;
$this->sr = @ldap_list($this->cid, $basedn, $filter);
- $ldap->error = @ldap_error($this->cid);
+ $this->error = @ldap_error($this->cid);
$this->resetResult();
$this->hasres=true;
return($this->sr);
$att= @ldap_get_attributes($this->cid, $this->re);
$att['dn']= @ldap_get_dn($this->cid, $this->re);
}
- $ldap->error = @ldap_error($this->cid);
+ $this->error = @ldap_error($this->cid);
if (!isset($att)){
$att= array();
}
{
$rv = @ldap_get_dn($this->cid, $this->re);
- $ldap->error = @ldap_error($this->cid);
+ $this->error = @ldap_error($this->cid);
$rv= preg_replace("/[ ]*,[ ]*/", ",", $rv);
return($rv);
}
if($this->hascon){
if($this->hasres){
$rv = @ldap_count_entries($this->cid, $this->sr);
- $ldap->error = @ldap_error($this->cid);
+ $this->error = @ldap_error($this->cid);
return($rv);
}else{
$this->error = "Perform a Fetch with no Search";
$dn = $this->basedn;
$r = @ldap_mod_del($this->cid, $dn, $attrs);
- $ldap->error = @ldap_error($this->cid);
+ $this->error = @ldap_error($this->cid);
return($r);
}else{
$this->error = "Could not connect to LDAP server";
$dn = $this->basedn;
$r = @ldap_mod_replace($this->cid, $dn, $attrs);
- $ldap->error = @ldap_error($this->cid);
+ $this->error = @ldap_error($this->cid);
return($r);
}else{
$this->error = "Could not connect to LDAP server";
diff --git a/include/functions.inc b/include/functions.inc
index 58d618b8b0e89ff61e817d312b7cdf5475c2c8e2..8323cbfe1ead3aead2b56dd3785d320881cb8e17 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
$svn_path = '$HeadURL$';
- if (!preg_match('%/gosa/trunk/%', $svn_path)){
- gosa_log ("PHP error: $errstr ($errfile, line $errline)");
- return;
- }
-
/* FIXME: workaround for buggy imap_open */
if (preg_match('/imap_open/', $errstr)){
return;
}
+ /* FIXME: workaround for PHP5 */
+ if (preg_match('/var: Deprecated./', $errstr)){
+ return;
+ }
+
+
+ if (!preg_match('%/gosa/trunk/%', $svn_path)){
+ gosa_log ("PHP error: $errstr ($errfile, line $errline)");
+ return;
+ }
+
/* Extract traceback data */
$trace= debug_backtrace();
/* Create error header */
- $error_collector.= "<table width=100% cellspacing=0 style='background-color:#402005;color:white;border:2px solid red'><tr><td colspan=3><h1>"._("PHP error")."</h1> \"$errstr\"</td></tr>";
+ $error_collector.= "<table width=100% cellspacing=0 style='background-color:#402005;color:white;border:2px solid red'><tr><td colspan=3><h1 style='color:white'>"._("PHP error")." \"$errstr\"</h1></td></tr>";
/* Generate trace history */
for ($index= 1; $index<count($trace); $index++){