Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Book provider docs #411

Closed
Ragazzo opened this issue Sep 1, 2014 · 1 comment · Fixed by #412
Closed

Book provider docs #411

Ragazzo opened this issue Sep 1, 2014 · 1 comment · Fixed by #412

Comments

@Ragazzo
Copy link
Contributor

Ragazzo commented Sep 1, 2014

Book provider in docs should be fixed, because it cant generate 13 length numbers due to restriction of mt_getrandmax(), if i run Book provider from docs like below:

 public function ISBN()
{
    return $this->generator->randomNumber(13);
}

i got following exception:

InvalidArgumentException: randomNumber() can only generate numbers up to mt_getrandmax()

so it should be fixed and noted in docs. Or is there anything i am missing and this setting can be configured somehow? For now i got:

var_dump(mt_getrandmax()); //int(2147483647)

P.S. Ubuntu 13.04, php 5.5.3

@fzaninotto
Copy link
Owner

I also fixed another wrong ISBN generator in the docs in eb28eb0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants