Просмотр исходного кода

Fixing ZF-5896 (sort of) - dropping the variable

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@17011 44c647ce-9c0f-0410-b52a-842ac1e357ba
shahar 16 лет назад
Родитель
Сommit
aacb8f0b7f
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      library/Zend/Http/Client.php

+ 3 - 3
library/Zend/Http/Client.php

@@ -331,15 +331,15 @@ class Zend_Http_Client
      */
     public function setMethod($method = self::GET)
     {
-        $regex = '/^[^\x00-\x1f\x7f-\xff\(\)<>@,;:\\\\"\/\[\]\?={}\s]+$/';
-        if (! preg_match($regex, $method)) {
+        if (! preg_match('/^[^\x00-\x1f\x7f-\xff\(\)<>@,;:\\\\"\/\[\]\?={}\s]+$/', $method)) {
             /** @see Zend_Http_Client_Exception */
             require_once 'Zend/Http/Client/Exception.php';
             throw new Zend_Http_Client_Exception("'{$method}' is not a valid HTTP request method.");
         }
 
-        if ($method == self::POST && $this->enctype === null)
+        if ($method == self::POST && $this->enctype === null) {
             $this->setEncType(self::ENC_URLENCODED);
+        }
 
         $this->method = $method;