summaryrefslogtreecommitdiff
path: root/inc/parser
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2011-10-15 14:24:20 +0200
committerAndreas Gohr <andi@splitbrain.org>2011-10-15 14:24:20 +0200
commitd8f7a7f328a68b48d9ef5c0987b6a4915d43735e (patch)
treea542b90de21dd68f1c639524408b3d5ee1f081bd /inc/parser
parenta284275484f42c92beaac76c05a80e66d3ab3026 (diff)
downloadrpg-d8f7a7f328a68b48d9ef5c0987b6a4915d43735e.tar.gz
rpg-d8f7a7f328a68b48d9ef5c0987b6a4915d43735e.tar.bz2
replace unset with array_pop
unset does not reset the Array's internal pointer which messes up later calls. array_pop is still much faster than array_splice
Diffstat (limited to 'inc/parser')
-rw-r--r--inc/parser/handler.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index fd4304ba5..55b715ad9 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -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; $x>$i; $x--) array_pop($this->calls);
}else{
// remove ending linebreaks in the paragraph
$i=count($this->calls)-1;