The Safe\shell_exec function currently throws an exception when null is returned from \shell_exec. A null return is not always equal to an error occording to the docs.
https://www.php.net/manual/en/function.shell-exec.php
This function can return null both when an error occurs or the program produces no output. It is not possible to detect execution failures using this function.
The
Safe\shell_execfunction currently throws an exception whennullis returned from\shell_exec. Anullreturn is not always equal to an error occording to the docs.https://www.php.net/manual/en/function.shell-exec.php