From 15f7e14bc82f3620527324354b37036c9075d419 Mon Sep 17 00:00:00 2001 From: Anton Vovchenko Date: Wed, 13 Jul 2016 20:15:15 +0300 Subject: [PATCH] Allow set CurlLite option to Null Even if option not supported we can allow set it to Null. It required for compatibility with Guzzle library - https://github.com/guzzle/guzzle/blob/master/src/Handler/CurlFactory.php#L77 . --- google/appengine/runtime/CurlLite.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/google/appengine/runtime/CurlLite.php b/google/appengine/runtime/CurlLite.php index d3929c63..08482c4c 100644 --- a/google/appengine/runtime/CurlLite.php +++ b/google/appengine/runtime/CurlLite.php @@ -484,9 +484,10 @@ private function setOption($key, $value) { case CURLOPT_QUOTE: case CURLOPT_PROGRESSFUNCTION: case CURLOPT_SHARE: - throw new CurlLiteOptionNotSupportedException( - 'Option ' . $key . ' is not supported by this curl implementation.'); - + if ($value !== null) { + throw new CurlLiteOptionNotSupportedException( + 'Option ' . $key . ' is not supported by this curl implementation.'); + } // Everything else is a no-op, or will be configured at request time. default: }