Index: kernel/classes/ezcontentobjecttreenode.php
===================================================================
--- kernel/classes/ezcontentobjecttreenode.php	(revision 24490)
+++ kernel/classes/ezcontentobjecttreenode.php	(working copy)
@@ -5541,19 +5541,14 @@
     */
     function updateAndStoreModified()
     {
-        $pathArray = explode( '/', $this->attribute( 'path_string' ) );
-        $sql = '';
+        $pathArray = explode( '/', trim( $this->attribute( 'path_string' ), '/' ) );
 
-        for( $pathCount = 1; $pathCount < count( $pathArray ) - 1; ++$pathCount )
+        if ( count( $pathArray ) > 0 )
         {
-            $sql .= ( $pathCount != 1 ? 'OR ' : '' ) . 'node_id=\'' . $pathArray[$pathCount] . '\' ';
-        }
-
-        if ( $sql != '' )
-        {
-            $sql = 'UPDATE ezcontentobject_tree SET modified_subnode=' . time() .
-                 ' WHERE ' . $sql;
             $db = eZDB::instance();
+            $inSQL = $db->generateSQLINStatement( $pathArray, 'node_id', false, true, 'int' );
+            $sql = 'UPDATE ezcontentobject_tree SET modified_subnode=' . time() .
+                   " WHERE $inSQL";
             $db->query( $sql );
         }
     }
