mirror of
https://github.com/mrclay/minify.git
synced 2025-08-12 17:14:24 +02:00
Merge pull request #677 from mrclay/php-7.4
This commit is contained in:
@@ -19,6 +19,7 @@ jobs:
|
|||||||
- php: "7.2"
|
- php: "7.2"
|
||||||
- php: "7.3"
|
- php: "7.3"
|
||||||
- php: "7.4"
|
- php: "7.4"
|
||||||
|
- php: "nightly"
|
||||||
- name: "Php CS Fixer"
|
- name: "Php CS Fixer"
|
||||||
php: "7.3"
|
php: "7.3"
|
||||||
env:
|
env:
|
||||||
|
@@ -317,7 +317,9 @@ class HTTP_ConditionalGet
|
|||||||
if (!isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
|
if (!isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$clientEtagList = $_SERVER['HTTP_IF_NONE_MATCH'];
|
$clientEtagList = PHP_VERSION_ID < 50400 && get_magic_quotes_gpc()
|
||||||
|
? stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])
|
||||||
|
: $_SERVER['HTTP_IF_NONE_MATCH'];
|
||||||
$clientEtags = explode(',', $clientEtagList);
|
$clientEtags = explode(',', $clientEtagList);
|
||||||
|
|
||||||
$compareTo = $this->normalizeEtag($this->_etag);
|
$compareTo = $this->normalizeEtag($this->_etag);
|
||||||
|
@@ -182,7 +182,7 @@ class Minify_ImportProcessor
|
|||||||
private function truepath($path)
|
private function truepath($path)
|
||||||
{
|
{
|
||||||
// whether $path is unix or not
|
// whether $path is unix or not
|
||||||
$unipath = ('' === $path) || ($path{0} !== '/');
|
$unipath = ('' === $path) || ($path[0] !== '/');
|
||||||
|
|
||||||
// attempts to detect if path is relative in which case, add cwd
|
// attempts to detect if path is relative in which case, add cwd
|
||||||
if (strpos($path, ':') === false && $unipath) {
|
if (strpos($path, ':') === false && $unipath) {
|
||||||
|
@@ -17,7 +17,7 @@ function getPost($key)
|
|||||||
if (! isset($_POST[$key])) {
|
if (! isset($_POST[$key])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return get_magic_quotes_gpc()
|
return (PHP_VERSION_ID < 50400 && get_magic_quotes_gpc())
|
||||||
? stripslashes($_POST[$key])
|
? stripslashes($_POST[$key])
|
||||||
: $_POST[$key];
|
: $_POST[$key];
|
||||||
}
|
}
|
||||||
|
@@ -127,7 +127,7 @@ class HTTPConditionalGetTest extends TestCase
|
|||||||
if (null === $inm) {
|
if (null === $inm) {
|
||||||
unset($_SERVER['HTTP_IF_NONE_MATCH']);
|
unset($_SERVER['HTTP_IF_NONE_MATCH']);
|
||||||
} else {
|
} else {
|
||||||
$_SERVER['HTTP_IF_NONE_MATCH'] = get_magic_quotes_gpc()
|
$_SERVER['HTTP_IF_NONE_MATCH'] = PHP_VERSION_ID < 50400 && get_magic_quotes_gpc()
|
||||||
? addslashes($inm) :
|
? addslashes($inm) :
|
||||||
$inm;
|
$inm;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user