Skip to content

Commit

Permalink
Fix silly bug when flattening hits.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Pope committed Nov 4, 2010
1 parent 65f19e9 commit b5b1b25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Twitter/HitHighlighter.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function addHitHighlighting(array $hits) {
$start_in_chunk = false;
# Flatten the multidimensional hits array:
$hits_flat = array();
foreach ($hits as $hit) $hits_flat += $hit;
foreach ($hits as $hit) $hits_flat = array_merge($hits_flat, $hit);
# Loop over the hit indices:
for ($index = 0; $index < count($hits_flat); $index++) {
$hit = $hits_flat[$index];
Expand Down

0 comments on commit b5b1b25

Please sign in to comment.