Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f47626c

Browse filesBrowse files
minor #24003 [Cache] Use zend.detect_unicode instead of zend.multibyte (nicolas-grekas)
This PR was merged into the 3.3 branch. Discussion ---------- [Cache] Use zend.detect_unicode instead of zend.multibyte | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22972, #23985 | License | MIT | Doc PR | - Verified. Commits ------- e600cd8 [Cache] Use zend.detect_unicode instead of zend.multibyte
2 parents 726c567 + e600cd8 commit f47626c
Copy full SHA for f47626c

File tree

Expand file treeCollapse file tree

6 files changed

+14
-14
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+14
-14
lines changed

‎src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct($file, AdapterInterface $fallbackPool)
3838
{
3939
$this->file = $file;
4040
$this->fallbackPool = $fallbackPool;
41-
$this->zendMultiByte = ini_get('zend.multibyte');
41+
$this->zendDetectUnicode = ini_get('zend.detect_unicode');
4242
$this->createCacheItem = \Closure::bind(
4343
function ($key, $value, $isHit) {
4444
$item = new CacheItem();

‎src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ public function __construct($namespace = '', $defaultLifetime = 0, $directory =
3535

3636
$e = new \Exception();
3737
$this->includeHandler = function () use ($e) { throw $e; };
38-
$this->zendMultiByte = ini_get('zend.multibyte');
38+
$this->zendDetectUnicode = ini_get('zend.detect_unicode');
3939
}
4040
}

‎src/Symfony/Component/Cache/Simple/PhpArrayCache.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Simple/PhpArrayCache.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct($file, CacheInterface $fallbackPool)
3434
{
3535
$this->file = $file;
3636
$this->fallbackPool = $fallbackPool;
37-
$this->zendMultiByte = ini_get('zend.multibyte');
37+
$this->zendDetectUnicode = ini_get('zend.detect_unicode');
3838
}
3939

4040
/**

‎src/Symfony/Component/Cache/Simple/PhpFilesCache.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Simple/PhpFilesCache.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ public function __construct($namespace = '', $defaultLifetime = 0, $directory =
3535

3636
$e = new \Exception();
3737
$this->includeHandler = function () use ($e) { throw $e; };
38-
$this->zendMultiByte = ini_get('zend.multibyte');
38+
$this->zendDetectUnicode = ini_get('zend.detect_unicode');
3939
}
4040
}

‎src/Symfony/Component/Cache/Traits/PhpArrayTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Traits/PhpArrayTrait.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ trait PhpArrayTrait
2525
private $file;
2626
private $values;
2727
private $fallbackPool;
28-
private $zendMultiByte;
28+
private $zendDetectUnicode;
2929

3030
/**
3131
* Store an array of cached values.
@@ -127,14 +127,14 @@ public function clear()
127127
*/
128128
private function initialize()
129129
{
130-
if ($this->zendMultiByte) {
131-
$zmb = ini_set('zend.multibyte', 0);
130+
if ($this->zendDetectUnicode) {
131+
$zmb = ini_set('zend.detect_unicode', 0);
132132
}
133133
try {
134134
$this->values = file_exists($this->file) ? (include $this->file ?: array()) : array();
135135
} finally {
136-
if ($this->zendMultiByte) {
137-
ini_set('zend.multibyte', $zmb);
136+
if ($this->zendDetectUnicode) {
137+
ini_set('zend.detect_unicode', $zmb);
138138
}
139139
}
140140
}

‎src/Symfony/Component/Cache/Traits/PhpFilesTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Traits/PhpFilesTrait.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ trait PhpFilesTrait
2525
use FilesystemCommonTrait;
2626

2727
private $includeHandler;
28-
private $zendMultiByte;
28+
private $zendDetectUnicode;
2929

3030
public static function isSupported()
3131
{
@@ -40,8 +40,8 @@ protected function doFetch(array $ids)
4040
$values = array();
4141
$now = time();
4242

43-
if ($this->zendMultiByte) {
44-
$zmb = ini_set('zend.multibyte', 0);
43+
if ($this->zendDetectUnicode) {
44+
$zmb = ini_set('zend.detect_unicode', 0);
4545
}
4646
set_error_handler($this->includeHandler);
4747
try {
@@ -58,8 +58,8 @@ protected function doFetch(array $ids)
5858
}
5959
} finally {
6060
restore_error_handler();
61-
if ($this->zendMultiByte) {
62-
ini_set('zend.multibyte', $zmb);
61+
if ($this->zendDetectUnicode) {
62+
ini_set('zend.detect_unicode', $zmb);
6363
}
6464
}
6565

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.