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

Commit

Permalink
Revert "Revert "Merge branch 'superdweebie-rand-bugfix'""
Browse files Browse the repository at this point in the history
This reverts commit b0ae4689135d62555cf9bbe55cdd7dddcd2d8f05 in order to allow
forward-porting fixes to develop.

Conflicts:
	library/Zend/ModuleManager/ModuleEvent.php
  • Loading branch information
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 10 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,26 @@
"ext-bcmath": "If using the bcmath functionality",
"ext-gmp": "If using the gmp functionality",
"ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable",
"zendframework/zend-servicemanager": ">= current version, if using the BigInteger::factory functionality"
"zendframework/zend-servicemanager": "Zend\\ServiceManager component",
"ircmaxell/security-lib": "SecurityLib component"
},
"extra": {
"branch-alias": {
"dev-master": "2.2-dev",
"dev-develop": "2.3-dev"
}
},
"autoload-dev": {
"psr-4": {
"ZendTest\\Math\\": "test/"
}
},
"require-dev": {
"ircmaxell/random-lib": "*",
"ircmaxell/security-lib": "*",
"zendframework/zend-servicemanager": "self.version",
"fabpot/php-cs-fixer": "1.7.*",
"satooshi/php-coveralls": "dev-master",
"phpunit/PHPUnit": "~4.0"
},
"autoload-dev": {
"psr-4": {
"ZendTest\\Math\\": "test/"
}
}
}
2 changes: 2 additions & 0 deletions src/Rand.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ abstract class Rand
*/
public static function getBytes($length, $strong = false)
{
$length = (int) $length;

if ($length <= 0) {
return false;
}
Expand Down

0 comments on commit 10c6be0

Please sign in to comment.