Code

Fixed array handling in post events
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 2 Aug 2005 11:56:08 +0000 (11:56 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 2 Aug 2005 11:56:08 +0000 (11:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1047 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_plugin.inc

index 0240722a706074e227e6a1246ff073dbfd95afb5..bd9f630f8f9e0e1dd30e1e21a69cb00fc03884c1 100644 (file)
@@ -384,7 +384,9 @@ class plugin
     if ($command != ""){
       /* Walk through attribute list */
       foreach ($this->attributes as $attr){
-        $command= preg_replace("/%$attr/", $this->$attr, $command);
+        if (!is_array($this->$attr)){
+          $command= preg_replace("/%$attr/", $this->$attr, $command);
+        }
       }
       $command= preg_replace("/%dn/", $this->dn, $command);
       if (check_command($command)){
@@ -410,7 +412,9 @@ class plugin
     if ($command != ""){
       /* Walk through attribute list */
       foreach ($this->attributes as $attr){
-        $command= preg_replace("/%$attr/", $this->$attr, $command);
+        if (!is_array($this->$attr)){
+          $command= preg_replace("/%$attr/", $this->$attr, $command);
+        }
       }
       $command= preg_replace("/%dn/", $this->dn, $command);
       if (check_command($command)){
@@ -436,7 +440,9 @@ class plugin
     if ($command != ""){
       /* Walk through attribute list */
       foreach ($this->attributes as $attr){
-        $command= preg_replace("/%$attr/", $this->$attr, $command);
+        if (!is_array($this->$attr)){
+          $command= preg_replace("/%$attr/", $this->$attr, $command);
+        }
       }
       $command= preg_replace("/%dn/", $this->dn, $command);
       if (check_command($command)){