mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
Merge pull request #6602 from Crizz0/ticket/17306-master
[ticket/17306] Add type declaration to get_context and array for $words (for Master)
This commit is contained in:
@@ -324,7 +324,7 @@ function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_po
|
||||
*
|
||||
* @return string Context of the specified words separated by "..."
|
||||
*/
|
||||
function get_context($text, $words, $length = 400)
|
||||
function get_context(string $text, array $words, int $length = 400)
|
||||
{
|
||||
// first replace all whitespaces with single spaces
|
||||
$text = preg_replace('/ +/', ' ', strtr($text, "\t\n\r\x0C ", ' '));
|
||||
|
Reference in New Issue
Block a user