Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: PHP 7.2 E_WARNING about sizeof() #84

Merged
merged 16 commits into from
Jan 3, 2018
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ You may now run it with the artisan migrate command:

$ php artisan migrate --seed

After running this command the filled countries table will be available
After running this command the filled countries table will be available
2 changes: 1 addition & 1 deletion src/Webpatser/Countries/Countries.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct()
protected function getCountries()
{
//Get the countries from the JSON file
if (sizeof($this->countries) == 0){
if (empty($this->countries)){
$this->countries = json_decode(file_get_contents(__DIR__ . '/Models/countries.json'), true);
}

Expand Down