Skip to content

Commit

Permalink
Fix setup with spaces in path to php binary (#2803)
Browse files Browse the repository at this point in the history
e.g. C:\Program Files\php\php.exe
  • Loading branch information
bwoebi committed Aug 21, 2024
1 parent e79d9c3 commit 5f56332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datadog-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ function check_library_prerequisite_or_exit($requiredLibrary)
*/
function check_php_ext_prerequisite_or_exit($binary, $extName)
{
$extensions = shell_exec("$binary -m");
$extensions = shell_exec(escapeshellarg($binary) . " -m");

if (!in_array($extName, array_map("trim", explode("\n", $extensions)))) {
print_error_and_exit("Required PHP extension '$extName' not found.\n");
Expand Down

0 comments on commit 5f56332

Please sign in to comment.