During debugging my code I noticed that hook_node_presave()
is called 3 times when I edit a node. Why?
I use the following code to count how many times the function is called:
function mymodule_node_presave($node) { static $counter = 0; // Some code... $counter++; watchdog('mymodule', "hook has been called $counter"); }