Drupal quick tip of the day: react differently to CLI calls
Sometimes you want to react differently, when the current script is running in a command-line environment. Here's how you can do this.
Every developer knows that kind of situations, where you spend hours chasing a problem, that suddenly appeared, and the more you debug and dive into fixing it, the more you get confused and unnerved. And when you finally have found the solution, it turns out, that it was a very simple and stupid bug, you've created unwittingly - the sort of cause, you haven't ever thought about, and you feel like bumping your head hard onto the wall...