Merge pull request #9 from gwinn/master

Bugfixes
This commit is contained in:
Alex Lushpai 2016-02-10 23:14:22 +03:00
commit c25617ff45
2 changed files with 1 additions and 8 deletions

View File

@ -14,16 +14,9 @@ $shortopts = 'dluce:m:p:r:h:';
$options = getopt($shortopts); $options = getopt($shortopts);
if (!$options || $options == -1) {
$opt = new OptHelper($shortopts);
$options = $opt->get();
}
if (isset($options['e'])) { if (isset($options['e'])) {
$command = new Command($options); $command = new Command($options);
$command->run(); $command->run();
} elseif (!$options) {
CommandHelper::notWorkGetOptNotice();
} else { } else {
CommandHelper::runHelp(); CommandHelper::runHelp();
} }

View File

@ -4,7 +4,7 @@ class DataHelper
{ {
public static function getDate($file) public static function getDate($file)
{ {
if (file_exists($file)) { if (file_exists($file) && 1 < filesize($file)) {
$result = file_get_contents($file); $result = file_get_contents($file);
} else { } else {
$result = date( $result = date(