I was trying to pass in an array of key value pairs with curl_setopt with CurlOption = CURLOPT_POSTFIELDS. One of my array values was an empty string. I debugged the code to CurlForm.Create. The first character in the string is compared to "@" to determine if the array needs to be treated as a file (per the comment). But the string is not first checked to determine if the length of the string is >= 1. The PHP run-time allows for an empty string, so the Phalanger Curl extensions should too. I also need to test the possibility of a null value in the run-time so that Phalanger's behavior is exactly the same as the official PHP run-time. I will do a pull request tonight or tomorrow night and fix this issue.
@sdegenhardt13 Phalanger's development is mostly discontinued in favor of PeachPie, the more modern compiler and runtime that also targets .NET Core. Please feel free to give that a try.
I was trying to pass in an array of key value pairs with curl_setopt with CurlOption = CURLOPT_POSTFIELDS. One of my array values was an empty string. I debugged the code to CurlForm.Create. The first character in the string is compared to "@" to determine if the array needs to be treated as a file (per the comment). But the string is not first checked to determine if the length of the string is >= 1. The PHP run-time allows for an empty string, so the Phalanger Curl extensions should too. I also need to test the possibility of a null value in the run-time so that Phalanger's behavior is exactly the same as the official PHP run-time. I will do a pull request tonight or tomorrow night and fix this issue.