We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23326c4 commit 72bb062Copy full SHA for 72bb062
src/Optimizely/Event/Dispatcher/CurlEventDispatcher.php
@@ -17,6 +17,7 @@
17
18
namespace Optimizely\Event\Dispatcher;
19
20
+use Exception;
21
use Optimizely\Event\LogEvent;
22
23
/**
@@ -35,6 +36,10 @@ public function dispatchEvent(LogEvent $event)
35
36
}
37
$cmd.= " -d '".json_encode($event->getParams())."'";
38
$cmd.= " '".$event->getUrl()."' > /dev/null 2>&1 &";
- exec($cmd);
39
+ exec($cmd, $output, $exit_code);
40
+
41
+ if ($exit_code !== 0) {
42
+ throw new Exception('Curl command failed.');
43
+ }
44
45
0 commit comments