Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 40fff43

Browse files
committed
bug #28377 fix fopen flags (SpacePossum)
This PR was merged into the 2.8 branch. Discussion ---------- fix fopen flags | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | none <!-- Fixes the flags/mode used with `fopen` --> Commits ------- 6d155ed fix fopen calls
2 parents ae59908 + 6d155ed commit 40fff43

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,8 +1413,8 @@ private function resetProcessData()
14131413
$this->exitcode = null;
14141414
$this->fallbackStatus = array();
14151415
$this->processInformation = null;
1416-
$this->stdout = fopen('php://temp/maxmemory:'.(1024 * 1024), 'wb+');
1417-
$this->stderr = fopen('php://temp/maxmemory:'.(1024 * 1024), 'wb+');
1416+
$this->stdout = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+b');
1417+
$this->stderr = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+b');
14181418
$this->process = null;
14191419
$this->latestSignal = null;
14201420
$this->status = self::STATUS_READY;

src/Symfony/Component/Translation/Dumper/CsvFileDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function format(MessageCatalogue $messages, $domain = 'messages')
3838
*/
3939
public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array())
4040
{
41-
$handle = fopen('php://memory', 'rb+');
41+
$handle = fopen('php://memory', 'r+b');
4242

4343
foreach ($messages->all($domain) as $source => $target) {
4444
fputcsv($handle, array($source, $target), $this->delimiter, $this->enclosure);

0 commit comments

Comments
 (0)