updated core and modules

This commit is contained in:
Bachir Soussi Chiadmi
2017-09-09 16:27:51 +02:00
parent 027aa99b32
commit 41863f872c
7810 changed files with 318922 additions and 83631 deletions
+3 -3
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);
@@ -137,7 +137,7 @@ class MoFileLoader extends FileLoader
}
/**
* Reads an unsigned long from stream respecting endianess.
* Reads an unsigned long from stream respecting endianness.
*
* @param resource $stream
* @param bool $isBigEndian
+9
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();