Improved handling of empty default languages
This commit is contained in:
parent
62975b0ef2
commit
a30b9e6927
1 changed files with 3 additions and 1 deletions
|
@ -2122,8 +2122,10 @@ class Item
|
|||
* @param array $default
|
||||
* @return array
|
||||
*/
|
||||
public static function getLanguageArray(string $body, int $count, int $uri_id = 0, int $author_id = 0, array $default = ['un' => 1]): array
|
||||
public static function getLanguageArray(string $body, int $count, int $uri_id = 0, int $author_id = 0, array $default = []): array
|
||||
{
|
||||
$default = $default ?: ['un' => 1];
|
||||
|
||||
$searchtext = BBCode::toSearchText($body, $uri_id);
|
||||
|
||||
if ((count(explode(' ', $searchtext)) < 10) && (mb_strlen($searchtext) < 30) && $author_id) {
|
||||
|
|
Loading…
Reference in a new issue