Browse Source

Merge pull request #6 from kevinvdburgt/kevinvdburgt-patch-1

Fixes constants which contains underscores.
Jan Oris 9 years ago
parent
commit
2013c3a238
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Ixudra/Curl/Builder.php

+ 2 - 2
src/Ixudra/Curl/Builder.php

@@ -219,7 +219,7 @@ class Builder {
     {
         $results = array();
         foreach( $this->curlOptions as $key => $value ) {
-            $array_key = constant( 'CURLOPT_' . str_replace('_', '', $key) );
+            $array_key = constant( 'CURLOPT_' . $key );
 
             if( $key == 'POST_FIELDS' && is_array( $value ) ) {
                 $results[ $array_key ] = http_build_query( $value, null, '&' );
@@ -231,4 +231,4 @@ class Builder {
         return $results;
     }
 
-}
+}