Index: modules/node.module =================================================================== --- modules/node.module (revision 19) +++ modules/node.module (revision 20) @@ -1076,7 +1077,12 @@ $node = node_load(array('nid' => $nid)); unset($node->revisions[$revision]); + // if the array is empty, replace the array by an empty string. + // otherwise an sql warning will be showed! + if(count($node->revisions)>=0){ + $node->revisions=''; + } node_save($node, array('nid', 'revisions')); drupal_set_message(t('Deleted revision %revision of %title', array('%revision' => "#$revision", '%title' => theme('placeholder', $node->title)))); {