Преглед на файлове

Accept calling setLenient(false)

Francesc Rosàs преди 13 години
родител
ревизия
789fc14145
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php

+ 4 - 2
src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php

@@ -416,11 +416,13 @@ class StubIntlDateFormatter
      *
      * @see    http://www.php.net/manual/en/intldateformatter.setlenient.php
      *
-     * @throws MethodNotImplementedException
+     * @throws MethodNotImplementedException When $lenient is true
      */
     public function setLenient($lenient)
     {
-        throw new MethodNotImplementedException(__METHOD__);
+        if ($lenient) {
+            throw new MethodNotImplementedException(__METHOD__);
+        }
     }
 
     /**