Update to Drupal 8.2.6. For more information, see https://www.drupal.org/project/drupal/releases/8.2.6

This commit is contained in:
Pantheon Automation 2017-02-02 16:28:38 -08:00 committed by Greg Anderson
parent db56c09587
commit f1e72395cb
588 changed files with 26857 additions and 2777 deletions

View file

@ -37,7 +37,7 @@ class MoFileLoader extends FileLoader
/**
* The size of the header of a MO file in bytes.
*
* @var int Number of bytes.
* @var int Number of bytes
*/
const MO_HEADER_SIZE = 28;
@ -80,7 +80,7 @@ class MoFileLoader extends FileLoader
$messages = array();
for ($i = 0; $i < $count; ++$i) {
$singularId = $pluralId = null;
$pluralId = null;
$translated = null;
fseek($stream, $offsetId + $i * 8);

View file

@ -160,20 +160,29 @@ class XliffFileLoader implements LoaderInterface
}
/**
* Validates and parses the given file into a DOMDocument.
*
* @param string $file
* @param \DOMDocument $dom
* @param string $schema source of the schema
*
* @throws \RuntimeException
* @throws InvalidResourceException
*/
private function validateSchema($file, \DOMDocument $dom, $schema)
{
$internalErrors = libxml_use_internal_errors(true);
$disableEntities = libxml_disable_entity_loader(false);
if (!@$dom->schemaValidateSource($schema)) {
libxml_disable_entity_loader($disableEntities);
throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: %s', $file, implode("\n", $this->getXmlErrors($internalErrors))));
}
libxml_disable_entity_loader($disableEntities);
$dom->normalizeDocument();
libxml_clear_errors();