Skip to content

Commit

Permalink
Use raw parsing mode for asset_compress.ini
Browse files Browse the repository at this point in the history
This will avoid parsing issues due to special characters like "^" in URLs.
  • Loading branch information
ADmad committed Oct 15, 2020
1 parent 3e86b98 commit 2a769af
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions config/defaults.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<?php

declare(strict_types=1);

use Cake\Core\Plugin;

// The function `parse_ini_file` may be disabled
$assets = parse_ini_string(file_get_contents(dirname(__FILE__) . '/asset_compress.ini'), true);
$assets = parse_ini_string(
file_get_contents(dirname(__FILE__) . '/asset_compress.ini'),
true,
INI_SCANNER_RAW
);

// Fix the CrudView local.css file for use Html::css()
foreach ($assets['crudview.css']['files'] as $i => $file) {
Expand Down

0 comments on commit 2a769af

Please sign in to comment.