Hi,

hum, I think there are some stale debug statements in this patch that shouldn't be there :-)

Cheers,
--
Damien
http://pwet.fr/blog

-------- Message original --------
Sujet: [sdk-svn] "[Commit: Trunk]" 23943 - in /trunk: doc/changelogs/4.2/unstable/CHANGELOG-4.2.0alpha1-to-4.2.0beta1 kernel/classes/ezcontentobjecttreenode.php
Date: Fri, 28 Aug 2009 14:51:08 -0000
De: Bertrand Dunogier <[email protected]>
Pour :: [email protected]

Author: bd
Date: Fri Aug 28 16:51:07 2009
New Revision: 23943

Log:
- Fixed bug #13497: attribute operator throws a PHP fatal error on a node without parent in a displayable
language

Modified:
    trunk/doc/changelogs/4.2/unstable/CHANGELOG-4.2.0alpha1-to-4.2.0beta1
    trunk/kernel/classes/ezcontentobjecttreenode.php

Modified: trunk/kernel/classes/ezcontentobjecttreenode.php
==============================================================================
--- trunk/kernel/classes/ezcontentobjecttreenode.php (original)
+++ trunk/kernel/classes/ezcontentobjecttreenode.php Fri Aug 28 16:51:07 2009
@@ -463,8 +463,10 @@
     */
     function canRemoveLocation()
     {
+        echo __FUNCTION__;
         if ( !isset( $this->Permissions['can_remove_location'] ) )
         {
+            echo "Calling checkAccess()\n";
             $this->Permissions['can_remove_location'] = $this->checkAccess( 'can_remove_location' );
         }
         return ( $this->Permissions['can_remove_location'] == 1 );
@@ -849,7 +851,7 @@
             $filter['tables']   = $sqlResult['tables'];
             $filter['joins']    = $sqlResult['joins'];
             $filter['columns']  = $sqlResult['columns'];
-            
+
             if( isset( $sqlResult['group_by'] ) )
                 $filter['group_by'] =  $sqlResult['group_by'];
         }
@@ -1899,7 +1901,7 @@
         {
             eZDebug::writeError( "Cannot use group_by parameter together with extended attribute filter which sets group_by!", __METHOD__ );
         }
-        
+
 
         $useVersionName     = true;
 
@@ -4291,11 +4293,17 @@
         $accessWord = $accessResult['accessWord'];
         if ( $origFunctionName == 'can_remove_location' )
         {
+            // echo "checkAccess( can_remove_location )\n";
             if ( $this->ParentNodeID <= 1 )
             {
                 return 0;
             }
             $currentNode = eZContentObjectTreeNode::fetch( $this->ParentNodeID );
+            if ( !$currentNode instanceof eZContentObjectTreeNode )
+            {
+                eZDebug::writeWarning( func_get_args(), __METHOD__ );
+                return 0;
+            }
             $contentObject = $currentNode->attribute( 'object' );
         }
         else
@@ -6100,4 +6108,4 @@
     protected $ClassIsContainer = null;
 }
 
-?>
+?>


-- 
Sdk-public mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/sdk-public

Reply via email to