Oleksandr Krasko
8b91de51c3
Fix null argument to preg_split
...
Deprecated Functionality: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated
https://www.php.net/manual/en/function.preg-split.php#refsect1-function.preg-split-parameters
limit:
If specified, then only substrings up to limit are returned with the
rest of the string being placed in the last substring. A limit of -1 or
0 means "no limit".
Refs:
- https://www.drupal.org/project/geshifilter/issues/3262325
Signed-off-by: Elan Ruusamäe <glen@pld-linux.org>
2022-05-14 14:01:14 +03:00
Elan Ruusamäe
b89bc57164
Fix Array and string offset access syntax with curly braces is deprecated
2020-10-24 18:52:22 +03:00
Elan Ruusamäe
b17c00c05c
Make code symmetric: Check on ConditionalGet as well
...
This partly reverts 5705fc9d899843fe8f6b6e0d361ccf01974b34a1
2020-07-12 10:34:01 +03:00
Elan Ruusamäe
b31855f6b8
Apply php-cs-fixer fixers
...
- braces
- function_declaration
- lowercase_keywords
- method_argument_space
- no_spaces_inside_parenthesis
- no_trailing_whitespace
- no_trailing_whitespace_in_comment
- single_blank_line_at_eof
2020-04-03 10:47:27 +03:00
Andrew Welch
0f607be23a
Exclude SSI Comments ( #670 )
...
* Exclude SSI comments
Exclude Nginx & Apache Server Side Include (SSI) comments from being stripped via minification, the same way IE directives are not stripped.
Both Nginx & Apache SSI directives begin with:
<!—#
So we can just look for the # and don’t strip the comment in that case.
Nginx SSI: http://nginx.org/en/docs/http/ngx_http_ssi_module.html
Apache SSI: https://httpd.apache.org/docs/2.4/howto/ssi.html
* Add tests for Nginx/Apache SSI directives
Co-authored-by: Andrew Welch <andrew@keluli.local>
2020-04-02 22:45:11 +03:00
robbykrlos
5705fc9d89
Function get_magic_quotes_gpc() is now deprecated in PHP 7.4 #661
...
- removed deprecated function that since PHP 5.4.0 returns FALSE always, and since PHP 7.4 is deprecated.
2020-03-06 19:20:17 +02:00
Matthias Zronek
2f33b69786
Bugfix for option sanitizer
2019-10-28 11:03:44 +01:00
Elan Ruusamäe
807f41903e
Merge pull request #642 from csabahete/master
...
Set "Vary: Accept-Encoding" header only if encoding is set and not empty
2019-09-19 10:30:56 +03:00
David Li
f50353a952
Check if each variable is in the symbol table.
...
Delete if not before passing into compact.
2019-02-27 14:39:56 -05:00
Csaba Hete
bd7d1077b3
set "Vary: Accept-Encoding" header only if encoding is set and not empty
2018-11-06 19:24:25 +01:00
Elan Ruusamäe
258e495451
Revert "simplify substr third param"
...
This reverts commit 5659799c4273b5b981a125b128d3cd7a640d86dc.
the change actually broken MinifyImportProcessorTest
2018-01-05 19:13:28 +02:00
Elan Ruusamäe
b97a1db01d
cleanup unneeded import
2018-01-05 19:09:42 +02:00
Elan Ruusamäe
df7fddfa09
import classes instead of manual qualify
2018-01-05 14:35:57 +02:00
Elan Ruusamäe
c580d24e1b
simplify return statement
2018-01-05 14:35:09 +02:00
Elan Ruusamäe
f9c96b6a3c
use in_array instead of array_search (clearer intent)
2018-01-05 14:34:43 +02:00
Elan Ruusamäe
d3decb27e1
strict comparison
2018-01-05 14:34:06 +02:00
Elan Ruusamäe
0038cdb5de
use empty string comparison instead of strlen
2018-01-05 14:34:06 +02:00
Elan Ruusamäe
5659799c42
simplify substr third param
2018-01-05 14:34:06 +02:00
Elan Ruusamäe
57be61586e
use origin function instead of alias
2018-01-05 14:33:52 +02:00
Elan Ruusamäe
2198482600
drop useless return phpdoc annotation for constructor
2018-01-05 14:30:01 +02:00
Elan Ruusamäe
c2f40feb0c
split workflows (no else after return)
2018-01-05 14:29:16 +02:00
Elan Ruusamäe
5c300aca97
do not define default value
2018-01-05 14:28:28 +02:00
Elan Ruusamäe
76c1edc6ff
drop stale version comment
2018-01-05 14:27:22 +02:00
Emanuele "ToX" Toscano
d9b392c474
Fix closure-compiler's "redirection limit reached"
...
Since a few days, the js minification was complaining about a redirection limit in the closure-compiler call. This was generating an error each time I have tried to use this tool.
After a bit of investigation I have found out that it was missing some parameters that are now mandatory. Plus, it now works in https only.
2017-11-03 10:24:25 +01:00
Steve Clay
72ece76cdf
Fixes syntax error in Groups controller
...
Fixes #613
2017-09-14 18:03:49 -04:00
Benoît Rouleau
6b274afd0b
unicode flag everywhere to fix more issues with and MAMP
2017-08-09 17:22:32 -04:00
Benoît Rouleau
449f009b39
Fix issue where minify() would corrupt Unicode characters (such as ) in some environments
...
Adding the `u` flag there fixes an issue in my environment (MAMP 4.1.1 with PHP 7.1.5) where `minify()` would corrupt the ` ` character (it would get replaced by the replacement character).
2017-07-20 20:34:49 -04:00
Elan Ruusamäe
80c01c6f02
php-cs-fixer fix
2017-04-18 18:24:17 +03:00
Elan Ruusamäe
b6e4b7f152
update cssmin import. resolves #590
...
refs a1489b2
2017-04-18 18:23:03 +03:00
Steve Clay
e904f2e1ae
ImportProcessor can handle URIs with query strings
...
Fixes #479
2017-04-03 16:50:53 -04:00
Steve Clay
62370404c8
Make sure $min_documentRoot is copied into Env.
...
Fixes #585
2017-04-03 16:36:33 -04:00
Steve Clay
532a010e0e
Parse LastModified date without requiring global timezone
2017-04-03 16:01:21 -04:00
Steve Clay
5f15af469d
Merge branch 'master' into static
2017-01-18 21:09:38 -05:00
Steve Clay
12b9096b23
URI rewriter passes through empty URLs
...
Fixes #561
2017-01-18 18:48:24 -05:00
Elan Ruusamäe
6a330d9091
pass any option to closure compiler
2016-12-06 16:59:36 +02:00
Elan Ruusamäe
b8c79ac8d4
Minify: add details to ContentType mismatch errors
2016-11-02 15:53:15 +02:00
Elan Ruusamäe
b31ddbf4c1
add missing .scss to css type map. #549
2016-10-17 15:14:56 +03:00
Elan Ruusamäe
74042c87ad
allow .scss via f= param. #549
2016-10-17 14:22:30 +03:00
Steve Clay
16c811cd93
Big style cleanup
2016-10-16 15:13:38 -04:00
Elan Ruusamäe
5fb7ea1ed1
phpcs: enable psr2
2016-10-16 18:51:49 +03:00
Elan Ruusamäe
0cc631c5a9
php-cs fixes
...
1) Minify.php (return)
2) Minify/Env.php (return)
3) Minify/JS/JShrink.php (return)
4) Minify/HTML/Helper.php (return)
5) Minify/Logger/LegacyHandler.php (unused_use)
6) Minify/Lines.php (return)
7) Minify/Controller/Files.php (unused_use)
8) Minify/ControllerInterface.php (unused_use)
9) Minify/Cache/File.php (return)
2016-10-16 16:44:58 +03:00
Elan Ruusamäe
2809e3c2eb
Merge pull request #550 from glensc/lessphp-cache
...
lessphp: use updated timestamp from cache
2016-10-16 13:51:17 +03:00
Elan Ruusamäe
a9891a031c
Merge pull request #549 from mrclay/scssphp
...
add scss support via leafo/scssphp
2016-10-16 13:50:58 +03:00
Elan Ruusamäe
035183b2b8
cacheIsStale is not public
2016-10-13 14:40:21 +03:00
Elan Ruusamäe
72dd4db37a
calculate lastmodified to be maximum accurate
...
the time() may be incorrect if there's slight delay between file modify and cache write. but as file modify is what is important, rely on that.
also needed to use different cache file because the format change.
2016-10-13 12:50:27 +03:00
Elan Ruusamäe
78d5921f91
lessphp: use updated timestamp from cache
...
no need to calculate the timestamp ourselves each time the calculated value already present in cache object
2016-10-13 12:40:48 +03:00
Elan Ruusamäe
3014900cd4
add base directory of input file to import path
...
this is needed for @import to be able to resolve included files
2016-10-13 12:20:50 +03:00
Elan Ruusamäe
fdc69a369e
add scss support via leafo/scssphp
2016-10-12 16:39:00 +03:00
Elan Ruusamäe
9ca1bc9e74
add checkAllowDirs to sourceFactoryOptions
...
needed to be able to specify the option via config
2016-10-12 16:34:39 +03:00
Steve Clay
59d4c97ffc
Minify now allows static file serving
...
With slightly altered URLs, Minify can cache files so they're served directly
from the filesystem instead of through PHP. A simple library helps create URLs
and clearing the cache.
See `static/README.md` for details.
2016-06-29 12:43:57 -04:00