-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
address potential arithmatic warnings in PHP 7.1+; related fuel/core#…
- Loading branch information
Showing
1 changed file
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30dcb1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It occurs in PHP 5.4.16
Uncaught exception LogicException: 0 - The parent constructor was not called: the object is in an invalid state in /home/web/api19/fuel/packages/oil/classes/generate.php on line 2037
Please see the URL, HTH.
https://bugs.php.net/bug.php?id=55701
30dcb1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHP 5.4 has been end of life for about 2,5 years now?
30dcb1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the market share of PHP 5.x is still high on the site,
I think that it is better to correspond.
https://w3techs.com/technologies/details/pl-php/all/all
https://w3techs.com/technologies/details/pl-php/5/all
In CentOS 7, the default is PHP 5.4.16.
30dcb1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two issues with GlobIterator:
According to the PHP team, both are not considered a bug, which I think might be open for debate.
It's probably best to just catch the LogicException, and take it count = 0 when that happens. I'll commit a fix, and scan the codebase for other uses of GlobIterator.
30dcb1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4df97c7