Clean some PHP code.

This commit is contained in:
Lars Jung 2016-08-11 00:33:06 +02:00
parent c559edc208
commit b6b8d9f144
5 changed files with 17 additions and 17 deletions

View file

@ -28,7 +28,7 @@ class Json {
$insideComment = false;
$json = '';
for ($i = 0; $i < strlen($commented_json); $i += 1) {
for ($i = 0, $len = strlen($commented_json); $i < $len; $i += 1) {
$char = $commented_json[$i];
$charchar = $char . @$commented_json[$i + 1];
$prevChar = @$commented_json[$i - 1];

View file

@ -73,7 +73,7 @@ class Archive {
header('Content-Length: ' . $total_size);
foreach ($dirs as $real_dir => $archived_dir) {
echo $this->php_tar_header($archived_dir, 0, @filemtime($real_dir . DIRECTORY_SEPARATOR . "."), 5);
echo $this->php_tar_header($archived_dir, 0, @filemtime($real_dir . DIRECTORY_SEPARATOR . '.'), 5);
}
foreach ($files as $real_file => $archived_file) {