diff options
| author | Cassio de Campos <cassiopc@gmail.com> | 2017-10-24 14:47:27 +0000 |
|---|---|---|
| committer | Cassio de Campos <cassiopc@gmail.com> | 2017-10-24 14:47:27 +0000 |
| commit | aec60f7111a508888eb3925236dbb8b856e29639 (patch) | |
| tree | 97485e57e7e70cf2a9803323e3adc614c5e4d431 /src/admin/misc.php | |
| parent | a98c69de0d7a357ea73c07ca14acacc53ec0a1d6 (diff) | |
| download | boca-aec60f7111a508888eb3925236dbb8b856e29639.tar.gz boca-aec60f7111a508888eb3925236dbb8b856e29639.zip | |
clean empty lines from updatelog
Diffstat (limited to 'src/admin/misc.php')
| -rw-r--r-- | src/admin/misc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/admin/misc.php b/src/admin/misc.php index 6eae53a..c1727f1 100644 --- a/src/admin/misc.php +++ b/src/admin/misc.php @@ -118,8 +118,8 @@ if (isset($_POST["Submit7"]) && $_POST["Submit7"] == "Revert Update") { if(is_writable($dir . $ds . "private" . $ds . "updateboca.log")) { $str = @file($dir . $ds . "private" . $ds . "updateboca.log"); if(count($str) >= 1) { - $t = trim($str[count($str)-1]); - unset($str[count($str)-1]); + while(count($str) >= 1 && ($t = trim($str[count($str)-1]))=='') + unset($str[count($str)-1]); $str = implode("\n", $str); fixbocadir($dir); echo "Reverting last update\n"; |