From: Antonio Ospite Date: Sun, 30 Oct 2016 09:28:41 +0000 (+0100) Subject: tweeper.php: check the return value of Tweeper::tweep() X-Git-Tag: v1.0.0~15 X-Git-Url: https://git.ao2.it/tweeper.git/commitdiff_plain/9c481b9a71983e1359c91748a7e5150700808599 tweeper.php: check the return value of Tweeper::tweep() If the tweep() method fails return 1 to the calling process so that it can know that something failed. --- diff --git a/tweeper.php b/tweeper.php index b1809ed..0955a11 100644 --- a/tweeper.php +++ b/tweeper.php @@ -442,4 +442,8 @@ if (!isset($options['src_url'])) { } $tweeper = new Tweeper($options['generate_enclosure']); -echo $tweeper->tweep($options['src_url']); +$output = $tweeper->tweep($options['src_url']); +if (is_null($output)) { + exit(1); +} +echo $output;