1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-21 13:21:59 +02:00

simplify substr third param

This commit is contained in:
Elan Ruusamäe
2018-01-05 14:32:01 +02:00
parent 57be61586e
commit 5659799c42

View File

@@ -135,7 +135,7 @@ class Minify_ImportProcessor
// $m[1] is either quoted or not
$quote = ($m[1][0] === "'" || $m[1][0] === '"') ? $m[1][0] : '';
$url = ($quote === '') ? $m[1] : substr($m[1], 1, strlen($m[1]) - 2);
$url = ($quote === '') ? $m[1] : substr($m[1], 1, -2);
if ('/' !== $url[0]) {
if (strpos($url, '//') > 0) {