Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Component/Serialization/YamlPecl.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
45 // such time as Drupal supports native PHP ErrorExceptions as the error | 45 // such time as Drupal supports native PHP ErrorExceptions as the error |
46 // handler, we need to temporarily set the error handler as ::errorHandler() | 46 // handler, we need to temporarily set the error handler as ::errorHandler() |
47 // and then restore it after decoding has occurred. This allows us to turn | 47 // and then restore it after decoding has occurred. This allows us to turn |
48 // parsing errors into a throwable exception. | 48 // parsing errors into a throwable exception. |
49 // @see Drupal\Component\Serialization\Exception\InvalidDataTypeException | 49 // @see Drupal\Component\Serialization\Exception\InvalidDataTypeException |
50 // @see http://php.net/manual/en/class.errorexception.php | 50 // @see http://php.net/manual/class.errorexception.php |
51 set_error_handler([__CLASS__, 'errorHandler']); | 51 set_error_handler([__CLASS__, 'errorHandler']); |
52 $ndocs = 0; | 52 $ndocs = 0; |
53 $data = yaml_parse($raw, 0, $ndocs, [ | 53 $data = yaml_parse($raw, 0, $ndocs, [ |
54 YAML_BOOL_TAG => '\Drupal\Component\Serialization\YamlPecl::applyBooleanCallbacks', | 54 YAML_BOOL_TAG => '\Drupal\Component\Serialization\YamlPecl::applyBooleanCallbacks', |
55 ]); | 55 ]); |