Fatal error in Back Office : copysubtree.php on line 729

Author Message

Sébastien Morel

Tuesday 06 March 2007 3:14:42 am

Hi,

Can you give your opinion about my fix for the bug explain here :
http://issues.ez.no/IssueView.php?Id=10388

Thanks

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)

Sébastien Morel

Wednesday 07 March 2007 2:11:29 am

I would just know if this fix will not generate another problem

copysubtree.php around the line 729 :

  $relatedNodeID = $relationItem->attributeValue('node-id');
  $relatedNode = eZContentObjectTreeNode::fetch( $relatedNodeID );
  $originalObjectID = $relatedNode->attribute('contentobject_id');

The error appends when the $relationItem->attributeValue('node-id') is empty so I have add a condition:

if ($relationItem->attributeValue('node-id')>0)
{
  $relatedNodeID = $relationItem->attributeValue('node-id');
  $relatedNode = eZContentObjectTreeNode::fetch( $relatedNodeID );
  $originalObjectID = $relatedNode->attribute('contentobject_id');
}else 
  $originalObjectID = $relationItem->attributeValue('contentobject-id');

Anybody ?

Thanks

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.