浏览代码

N°1065 Fixed a regression introduced in r4965.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4958 a333f486-631f-4898-b8df-5754b55c2be0
glajarige 7 年之前
父节点
当前提交
90509c8839
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      core/ormlinkset.class.inc.php

+ 2 - 2
core/ormlinkset.class.inc.php

@@ -415,7 +415,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
 	 */
 	 */
 	public function rewind()
 	public function rewind()
 	{
 	{
-		$this->iCursor = 0;
+	    $this->iCursor = 0;
 		reset($this->aPreserved);
 		reset($this->aPreserved);
         reset($this->aAdded);
         reset($this->aAdded);
         reset($this->aModified);
         reset($this->aModified);
@@ -490,7 +490,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
 			$this->aAdded = array();
 			$this->aAdded = array();
 			$this->aRemoved = array();
 			$this->aRemoved = array();
 			$this->aModified = array();
 			$this->aModified = array();
-			$this->aPreserved = $this->aOriginalObjects;
+			$this->aPreserved = ($this->aOriginalObjects === null) ? array() : $this->aOriginalObjects;
 			$this->bHasDelta = false;
 			$this->bHasDelta = false;
 
 
 			/** @var AttributeLinkedSet $oAttDef */
 			/** @var AttributeLinkedSet $oAttDef */