File: update_dataDir_to_live_in_proper_dir.patch

package info (click to toggle)
matthiasmullie-minify 1.3.73-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,140 kB
  • sloc: php: 3,198; javascript: 2,083; makefile: 38; xml: 27; sh: 6
file content (22 lines) | stat: -rw-r--r-- 1,106 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/src/JS.php
+++ b/src/JS.php
@@ -126,7 +126,7 @@ class JS extends Minify
     {
         call_user_func_array(array('\\MatthiasMullie\Minify\\Minify', '__construct'), func_get_args());
 
-        $dataDir = __DIR__ . '/../data/js/';
+        $dataDir = __DIR__ . '/data/js/';
         $options = FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES;
         $this->keywordsReserved = file($dataDir . 'keywords_reserved.txt', $options);
         $this->keywordsBefore = file($dataDir . 'keywords_before.txt', $options);
--- a/tests/JS/AbstractTest.php
+++ b/tests/JS/AbstractTest.php
@@ -132,7 +132,7 @@ class AbstractTest extends CompatTestCas
             // can't fork, ignore this test...
         } elseif ($pid === 0) {
             // https://github.com/matthiasmullie/minify/issues/111
-            ini_set('open_basedir', __DIR__ . '/../..');
+            ini_set('open_basedir', '/usr/share/php/MatthiasMullie/Minify:' . __DIR__ . '/../..');
 
             // instead of displaying warnings & moving to the next test, just
             // quit with the error code; the other thread will pick it up