Skip to content

Conversation

@wybcp
Copy link

@wybcp wybcp commented Jan 24, 2018

bug fixed#php7.2 the function sizeof() did not work ,replace it with empty() .

refer to : webpatser/laravel-countries#84


$relevantName = $nested['pieces'][sizeof($nested['pieces']) - 1];
$relevantModel = $nested['models'][sizeof($nested['models']) - 2];
$relevantName = $nested['pieces'][!empty($nested['pieces']) - 1];
Copy link

@JimChenWYU JimChenWYU Mar 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think it can simply replace sizeof with !empty here, it need a number to calculate, not a boolean value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants