Skip to content

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

Open
wybcp wants to merge 1 commit into
summerblue:masterfrom
wybcp:master
Open

bug fixed#php7.2 the function sizeof() did not work ,replace it with…#13
wybcp wants to merge 1 commit into
summerblue:masterfrom
wybcp:master

Conversation

@wybcp

@wybcp wybcp commented Jan 24, 2018

Copy link
Copy Markdown

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];

@JimChenWYU JimChenWYU Mar 27, 2018

Copy link
Copy Markdown

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