File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -72,20 +72,19 @@ protected function flush() {
7272
7373 private function createArgs ($ payload ) {
7474 $ scheme = $ this ->_ssl ? "https:// " : "http:// " ;
75- $ args = " -v - X POST " ;
75+ $ args = " -X POST " ;
7676 $ args .= " -H 'Content-Type: application/json' " ;
77- $ args .= " -H ' Authorization: api_key " . $ this ->_apiKey . " ' " ;
77+ $ args .= " -H " . escapeshellarg ( " Authorization: api_key " . $ this ->_apiKey ) ;
7878 $ args .= " -H 'User-Agent: PHPClient/ " . LDClient::VERSION . "' " ;
7979 $ args .= " -H 'Accept: application/json' " ;
80- $ args .= " -d ' " . $ payload . " ' " ;
81- $ args .= " " . $ scheme . $ this ->_host . ": " . $ this ->_port . "/api/events/bulk " ;
80+ $ args .= " -d " . escapeshellarg ( $ payload) ;
81+ $ args .= " " . escapeshellarg ( $ scheme . $ this ->_host . ": " . $ this ->_port . "/api/events/bulk " ) ;
8282 return $ args ;
8383 }
8484
8585 private function makeRequest ($ args ) {
86- error_log ("curl args: " . $ args );
87- $ cmd = "/usr/bin/env curl " . $ args . ">> /tmp/curl.log 2>&1 & " ;
88- $ out = shell_exec ($ cmd );
86+ $ cmd = "/usr/bin/env curl " . $ args . ">> /dev/null 2>&1 & " ;
87+ shell_exec ($ cmd );
8988 return true ;
9089 }
9190
You can’t perform that action at this time.
0 commit comments