technosophos/querypath — Issue #73: tplArrayR() element removal bug
Author: TomorrowToday
Created: 2012-02-15 02:18:36+00:00
State: open

```
$dead = $branch->last()->remove();
unset($dead);
```

was placed at the wrong point.

It works for most use cases, but any complex nesting may cause elements that aren't copied to be removed.

I have a solution that I'm testing. I'll make a pull request this weekend.