Details
-
Bug
-
Resolution: Fixed
-
High
-
4.7.0, 5.0, 5.1, 5.2, 5.3-dev
-
eZ Publish 4.7 Enterprise
PHP 5.3
Description
eZContentObjectTrashNode originalParent() method fails when called multiple times
*Steps to reproduce:*
1. Send any object to trash, remember its object id.
2. The following code piece shows the problem. Pay attention to the comments in code below :
<?php // Replace with the actual trashed object id $contentObjectId = 100; // Fetch trash node $trashNode = eZContentObjectTrashNode::fetchByContentObjectID( $contentObjectId ); // First call : works as intended, returns trash node original parent $originalParent = $trashNode->attribute( 'original_parent' ); if ( $originalParent instanceof eZContentObjectTreeNode ) echo 'First call : success'; // Subsequent call : fails, returns null $originalParent = $trashNode->attribute( 'original_parent' ); if ( $originalParent === null ) echo 'Second call : failure';