Skip to content

Commit a89f34c

Browse files
committed
Merge remote-tracking branch 'origin/AC-3160-fix-deprecation-issues-part8' into delivery-bunch-w22
2 parents fe9e048 + e360629 commit a89f34c

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

lib/internal/Magento/Framework/Backup/Media.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ protected function _prepareIgnoreList()
6565
foreach (new \DirectoryIterator($path) as $item) {
6666
$filename = $item->getFilename();
6767
if (!$item->isDot() && !in_array($filename, $whiteList)) {
68-
$this->addIgnorePaths(str_replace('\\', '/', $item->getPathname()));
68+
$this->addIgnorePaths(
69+
str_replace('\\', '/', $item->getPathname() !== null ? $item->getPathname() : '')
70+
);
6971
}
7072
}
7173
}

lib/internal/Magento/Framework/Cache/Backend/Decorator/Compression.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Compression extends \Magento\Framework\Cache\Backend\Decorator\AbstractDec
1616
/**
1717
* Prefix of compressed strings
1818
*/
19-
const COMPRESSION_PREFIX = 'CACHE_COMPRESSION';
19+
public const COMPRESSION_PREFIX = 'CACHE_COMPRESSION';
2020

2121
/**
2222
* Array of specific options. Made in separate array to distinguish from parent options
@@ -50,18 +50,17 @@ public function load($cacheId, $noTestCacheValidity = false)
5050
* Note : $data is always "string" (serialization is done by the
5151
* core not by the backend)
5252
*
53-
* @param string $data Datas to cache
54-
* @param string $cacheId Cache id
55-
* @param string[] $tags Array of strings, the cache record will be tagged by each string entry
56-
* @param bool $specificLifetime If != false, set a specific lifetime for this cache record
57-
* (null => infinite lifetime)
58-
* @param int $priority integer between 0 (very low priority) and 10 (maximum priority) used by
59-
* some particular backends
53+
* @param string $data Datas to cache
54+
* @param string $cacheId Cache id
55+
* @param string[] $tags Array of strings, the cache record will be tagged by each string entry
56+
* @param bool $specificLifetime If != false, set a specific lifetime for this cache record
57+
* (null => infinite lifetime)
58+
* @param int $priority integer between 0 (very low priority) and 10 (max priority) used by some particular backends
6059
* @return bool true if no problem
6160
*/
6261
public function save($data, $cacheId, $tags = [], $specificLifetime = false, $priority = 8)
6362
{
64-
if ($this->_isCompressionNeeded($data)) {
63+
if ($data !== null && $this->_isCompressionNeeded($data)) {
6564
$data = self::_compressData($data);
6665
}
6766

lib/internal/Magento/Framework/Code/Reader/NamespaceResolver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class NamespaceResolver
1414
/**
1515
* Namespace separator
1616
*/
17-
const NS_SEPARATOR = '\\';
17+
public const NS_SEPARATOR = '\\';
1818

1919
/**
2020
* @var ScalarTypesProvider
@@ -44,9 +44,9 @@ public function __construct(ScalarTypesProvider $scalarTypesProvider = null)
4444
*/
4545
public function resolveNamespace($type, array $availableNamespaces)
4646
{
47-
if (substr($type, 0, 1) !== self::NS_SEPARATOR
47+
if (!empty($type)
48+
&& substr($type, 0, 1) !== self::NS_SEPARATOR
4849
&& !in_array($type, $this->scalarTypesProvider->getTypes())
49-
&& !empty($type)
5050
) {
5151
$name = explode(self::NS_SEPARATOR, $type);
5252
$unqualifiedName = $name[0];

0 commit comments

Comments
 (0)