nikaia/translation-sheet

Support php 7.2

Thomasvanwijnen opened this issue · 2 comments

On php 7.2 I encountered the error: "count(): Parameter must be an array or an object that implements Countable" when using the 'php artisan translation_sheet:push' command

Spreadsheet.php line: 53 in the getTranslationsCount() method.

Fix:

public function getTranslationsCount()
{
    if(is_array($this->translations)){
        return count($this->translations);
    }

    return strlen($this->translations);
}

Fixed.