Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / http-foundation / JsonResponse.php
index 137ac33c46ed0c57734d3746e3a8a59bef86d804..d741ce099d730fb3d665e118653bd1c6d31bba20 100644 (file)
@@ -101,7 +101,7 @@ class JsonResponse extends Response
             );
             $parts = explode('.', $callback);
             foreach ($parts as $part) {
-                if (!preg_match($pattern, $part) || in_array($part, $reserved, true)) {
+                if (!preg_match($pattern, $part) || \in_array($part, $reserved, true)) {
                     throw new \InvalidArgumentException('The callback name is not valid.');
                 }
             }
@@ -139,7 +139,7 @@ class JsonResponse extends Response
      */
     public function setData($data = array())
     {
-        if (defined('HHVM_VERSION')) {
+        if (\defined('HHVM_VERSION')) {
             // HHVM does not trigger any warnings and let exceptions
             // thrown from a JsonSerializable object pass through.
             // If only PHP did the same...
@@ -156,7 +156,7 @@ class JsonResponse extends Response
                 try {
                     $data = json_encode($data, $this->encodingOptions);
                 } catch (\Exception $e) {
-                    if ('Exception' === get_class($e) && 0 === strpos($e->getMessage(), 'Failed calling ')) {
+                    if ('Exception' === \get_class($e) && 0 === strpos($e->getMessage(), 'Failed calling ')) {
                         throw $e->getPrevious() ?: $e;
                     }
                     throw $e;