Write error messages on STDERR and return saner values in CLI mode
authorAntonio Ospite <ospite@studenti.unina.it>
Fri, 8 Nov 2013 14:01:25 +0000 (15:01 +0100)
committerAntonio Ospite <ospite@studenti.unina.it>
Fri, 8 Nov 2013 14:01:25 +0000 (15:01 +0100)
The previous use of die() was not very useful in CLI mode as the script
was always returning 0.

Fix that and also write error messages to the appropriate output stream.

Note the use of 'php://output' as error stream for non CLI mode, this
ensures that error messages would be readable in the browser window.


No differences found