We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 82e4bdd + 7b2a0fe commit 979bcf6Copy full SHA for 979bcf6
Changes.md
@@ -1,5 +1,9 @@
1
# Changes
2
3
+## 3.1.2
4
+
5
+- Hit highlighting: avoid errors with PHP 8.
6
7
## 3.0.0
8
9
- Pass twitter-text conformance 3.0.0
lib/Twitter/Text/HitHighlighter.php
@@ -141,7 +141,7 @@ public function highlight($tweet = null, array $hits = null)
141
$offset = 0;
142
$start_in_chunk = false;
143
# Flatten the multidimensional hits array:
144
- $hits_flat = call_user_func_array('array_merge', $hits);
+ $hits_flat = call_user_func_array('array_merge', array_values($hits));
145
$hits_flat_count = count($hits_flat);
146
# Loop over the hit indices:
147
for ($index = 0; $index < $hits_flat_count; $index++) {
0 commit comments