From 4d43d98eedef2e8b231a32b11525212eb9d0d965 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 28 Sep 2011 14:11:14 +0000 Subject: [PATCH] Bug : get_object returns an array of one element instead of an object --- dev/manage-code/create-file/create_phpclass.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dev/manage-code/create-file/create_phpclass.py b/dev/manage-code/create-file/create_phpclass.py index 970ada521..cd89ec1e5 100755 --- a/dev/manage-code/create-file/create_phpclass.py +++ b/dev/manage-code/create-file/create_phpclass.py @@ -146,9 +146,7 @@ class @class_name@ @mother_class@ $oobj=new @class_name@ ($this->cn); $array=Database::fetch_array($p_ret,$idx); foreach ($array as $idx=>$value) { $oobj->$idx=$value; } - $aobj[]=clone $oobj; - - return $aobj; + return $oobj; } public function insert() { if ( $this->verify() != 0 ) return;