Skip to content

Commit

Permalink
Merge b4fc17e into 75b7fc3
Browse files Browse the repository at this point in the history
  • Loading branch information
adamaltman committed Apr 1, 2020
2 parents 75b7fc3 + b4fc17e commit 2f98764
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ matrix:
- php: "7.2"
- php: "7.3"
- php: "7.4"
allow_failures:
- php: "7.4"
# allow_failures:
# - php: "7.4"

notifications:
email: false
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"phpunit/phpunit": "^7.3",
"php-coveralls/php-coveralls": "^2.1",
"friendsofphp/php-cs-fixer": "^2.13",
"fzaninotto/faker": "~1.5",
"guzzlehttp/guzzle": "~6.0"
"guzzlehttp/guzzle": "~6.0",
"fzaninotto/faker": "^1.9.1"
},
"autoload-dev": {
"psr-4": {
Expand Down
26 changes: 13 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/Util/RebillySignature.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,13 @@ public static function generateSignature($apiUser, $apiKey)
*/
public static function generateNonce($length, $strong = true)
{
if ($length <= 0 || !$strong) {
throw new RuntimeException('Failed to generate random string');
}

$bytes = openssl_random_pseudo_bytes($length, $strong);

if ($bytes === false || !$strong) {
if ($bytes === false) {
throw new RuntimeException('Failed to generate random string');
}

Expand Down

0 comments on commit 2f98764

Please sign in to comment.