Mercurial > hg > isophonics-drupal-site
comparison vendor/guzzlehttp/guzzle/src/functions.php @ 13:5fb285c0d0e3
Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've
been lucky to get away with this so far, as we don't support self-registration
which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5
was vulnerable to.
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:33:26 +0100 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
12:7a779792577d | 13:5fb285c0d0e3 |
---|---|
300 function json_decode($json, $assoc = false, $depth = 512, $options = 0) | 300 function json_decode($json, $assoc = false, $depth = 512, $options = 0) |
301 { | 301 { |
302 $data = \json_decode($json, $assoc, $depth, $options); | 302 $data = \json_decode($json, $assoc, $depth, $options); |
303 if (JSON_ERROR_NONE !== json_last_error()) { | 303 if (JSON_ERROR_NONE !== json_last_error()) { |
304 throw new \InvalidArgumentException( | 304 throw new \InvalidArgumentException( |
305 'json_decode error: ' . json_last_error_msg()); | 305 'json_decode error: ' . json_last_error_msg() |
306 ); | |
306 } | 307 } |
307 | 308 |
308 return $data; | 309 return $data; |
309 } | 310 } |
310 | 311 |
322 function json_encode($value, $options = 0, $depth = 512) | 323 function json_encode($value, $options = 0, $depth = 512) |
323 { | 324 { |
324 $json = \json_encode($value, $options, $depth); | 325 $json = \json_encode($value, $options, $depth); |
325 if (JSON_ERROR_NONE !== json_last_error()) { | 326 if (JSON_ERROR_NONE !== json_last_error()) { |
326 throw new \InvalidArgumentException( | 327 throw new \InvalidArgumentException( |
327 'json_encode error: ' . json_last_error_msg()); | 328 'json_encode error: ' . json_last_error_msg() |
329 ); | |
328 } | 330 } |
329 | 331 |
330 return $json; | 332 return $json; |
331 } | 333 } |