Closed whisller closed 8 years ago
They are not octals, they are int. Which version of PHP are you using? Which Operative System and/or distribution?
It looks as though PHP 7 will now interpret any integer that begins with a 0
as an octal (see this reference of changes in PHP 7).
The integers that begin with 0
in Hyphens.php
simply need to have that zero removed and the code should continue to function. Happy to make a pull request that fixes this if you're interested @Fale.
Also it might be worthwhile adding PHP 7 as a platform on Travis CI (as an allowed failure) to facilitate in getting this package up to scratch for the new release.
I bumped in to the same issue. I have created a PR for this.
Thanks for the bug and thanks to @lasselehtinen for the patch that has just been merged!
Would you be able to tag a new release for the two recently merged PRs?
Not sure if you're following semantic versioning or not, but as the exceptions PR is a breaking change you might consider bumping to 3.0.0.
Thanks for remembering me. Just done it :)
Awesome, thanks so much!
Hey, today I wanted to add your library to my project, and php complained with an error message "Invalid octal literal - won't be reported by PHP but will work incorrectly".
It is inside of file
vendor/fale/isbn/src/Isbn/Hyphens.php
lines e.g. 144, 173, 191 etc. Everywhere where you did convertion to octals.Some links: