From: Antonio Ospite Date: Fri, 8 Nov 2013 14:01:25 +0000 (+0100) Subject: Write error messages on STDERR and return saner values in CLI mode X-Git-Tag: v0.1~6 X-Git-Url: https://git.ao2.it/tweeper.git/commitdiff_plain/d8118b5b03cd415ff41a895afdd9458ec93c88aa?hp=d8118b5b03cd415ff41a895afdd9458ec93c88aa Write error messages on STDERR and return saner values in CLI mode 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. ---