Code

Fixed acls & picture settings
[gosa.git] / include / php_writeexcel / class.writeexcel_format.inc.php
index 1523d3710b1f496588b62999d0021e306e0b83e2..144923f41df6e22ded63f5cf4dcedbd6f04064a0 100644 (file)
@@ -119,7 +119,16 @@ class writeexcel_format {
      */
     function copy($other) {
         $xf = $this->_xf_index;   // Backup XF index
-        $this = $other;           // Copy properties
+               
+               /* A better way to copy member vars, ... won't cause fatal errors in PHP5.
+           The only thing i can understand is : For what is this function used,
+                       it is never used by any object, as I can see in the source code.
+                  ...
+         */
+               foreach(get_object_vars($other) as $var => $val){
+                       $this->$var = $val;
+               }
+//        $this = $other;           // Copy properties
         $this->_xf_index = $xf;   // Restore XF index
     }