Skip to content

Commit 01d74c3

Browse files
author
Flavius12
committed
Update phartools.php
1 parent 8f3e720 commit 01d74c3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

phartools.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* PharTools (v1.0) by EvolSoft
55
* Developer: EvolSoft (Flavius12)
66
* Website: http://www.evolsoft.tk
7-
* Date: 23/04/2015 07:55 PM (UTC)
7+
* Date: 23/04/2015 08:02 PM (UTC)
88
* Copyright & License: (C) 2015 EvolSoft
99
* Licensed under MIT (https://github.com/EvolSoft/PharTools/blob/master/LICENSE)
1010
*/
@@ -33,7 +33,7 @@
3333
$compression = null;
3434
for($i = 0; $i < count($params) - 1; $i++){
3535
//Check Compression
36-
if($params[$i] == "-c" && substr($params[$i + 1], 1) != "-"){
36+
if($params[$i] == "-c" && substr($params[$i + 1], 0, 1) != "-"){
3737
if(strtolower($params[$i + 1]) == "gzip" || strtolower($params[$i + 1]) == "gz"){
3838
$compression = Phar::GZ;
3939
}elseif(strtolower($params[$i + 1]) == "bzip2" || strtolower($params[$i + 1]) == "bz2"){
@@ -43,15 +43,15 @@
4343
}
4444
}
4545
//Check Metadata
46-
if($params[$i] == "-m" && substr($params[$i + 1], 1) != "-"){
46+
if($params[$i] == "-m" && substr($params[$i + 1], 0, 1) != "-"){
4747
$metadata = stringToMetadata($params[$i + 1]);
4848
}
4949
//Check Stub
50-
if($params[$i] == "-s" && substr($params[$i + 1], 1) != "-"){
50+
if($params[$i] == "-s" && substr($params[$i + 1], 0, 1) != "-"){
5151
$stub = $params[$i + 1];
5252
}
5353
//Check Regex
54-
if($params[$i] == "-r" && substr($params[$i + 1], 1) != "-"){
54+
if($params[$i] == "-r" && substr($params[$i + 1], 0, 1) != "-"){
5555
$regex = $params[$i + 1];
5656
}
5757
}

0 commit comments

Comments
 (0)