fix off-by-one error

This commit is contained in:
Andreas Gohr 2011-10-15 13:16:37 +02:00
parent 6ed8c51115
commit a284275484

View file

@ -1522,7 +1522,7 @@ class Doku_Handler_Block {
if(trim($content)==''){
//remove the whole paragraph
//array_splice($this->calls,$i); // <- this is much slower than the loop below
for($x=$ccount-1; $x>=$i; $x--) unset($this->calls[$x]);
for($x=$ccount-1; $x>$i; $x--) unset($this->calls[$x]);
}else{
// remove ending linebreaks in the paragraph
$i=count($this->calls)-1;