File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 * PharTools (v1.0) by EvolSoft
55 * Developer: EvolSoft (Flavius12)
66 * Website: http://www.evolsoft.tk
7- * Date: 23 /04/2015 02:25 PM (UTC)
7+ * Date: 25 /04/2015 12:00 AM (UTC)
88 * Copyright & License: (C) 2015 EvolSoft
99 * Licensed under MIT (https://github.com/EvolSoft/PharTools/blob/master/LICENSE)
1010 */
3333 $ regex = null ;
3434 $ metadata = null ;
3535 $ compression = null ;
36- for ($ i = 0 ; $ i < count ($ params ) - 1 ; $ i ++){
36+ for ($ i = 0 ; $ i <= count ($ params ) - 1 ; $ i ++){
3737 if ($ params [$ i ] == "-c " ){ //Check Compression
3838 if (substr ($ params [$ i + 1 ], 0 , 1 ) != "- " ){
3939 if (strtolower ($ params [$ i + 1 ]) == "gzip " || strtolower ($ params [$ i + 1 ]) == "gz " ){
6565 }else {
6666 echo "Invalid regular expression specified! \n" ;
6767 }
68- }elseif (substr ($ params [$ i ], 0 , 1 ) == "- " ){ //Check if is a option
69- echo "\"" . $ params [$ i ] . "\" option not recognized \n" ;
68+ }else {
69+ if ($ i == count ($ params )){
70+ if (substr ($ params [$ i + 1 ], 0 , 1 ) == "- " ){ //Check if is a option
71+ echo "\"" . $ params [$ i + 1 ] . "\" option not recognized \n" ;
72+ }
73+ }else {
74+ if (substr ($ params [$ i ], 0 , 1 ) == "- " ){ //Check if is a option
75+ echo "\"" . $ params [$ i ] . "\" option not recognized \n" ;
76+ }
77+ }
7078 }
7179 }
7280 if (file_exists ($ argv [2 ])){
You can’t perform that action at this time.
0 commit comments