DEVSENSE / Phalanger

PHP 5.4 compiler for .NET/Mono frameworks. Predecessor to the opensource PeachPie project (www.peachpie.io).
http://v4.php-compiler.net/
Apache License 2.0
381 stars 92 forks source link

curl_setopt does not allow an empty string value as an array value #48

Open ghost opened 9 years ago

ghost commented 9 years ago

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.

bfistein commented 6 years ago

@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.