nikaia / translation-sheet

Translating Laravel languages files using a Google Spreadsheet.
GNU General Public License v3.0
291 stars 60 forks source link

Support php 7.2 #23

Closed Thomasvanwijnen closed 6 years ago

Thomasvanwijnen commented 6 years ago

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);
}
balping commented 6 years ago

https://github.com/nikaia/translation-sheet/pull/22

nbourguig commented 6 years ago

Fixed.