Skip to content

Commit

Permalink
Only throw once random_bytes() is invoked.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-scott committed Sep 10, 2015
1 parent a1d9f26 commit 4f39309
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/random.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@
* We don't have any more options, so let's throw an exception right now
* and hope the developer won't let it fail silently.
*/
throw new Exception(
'There is no suitable CSPRNG installed on your system'
);
function random_bytes()
{
throw new Exception(
'There is no suitable CSPRNG installed on your system'
);
}
}
}
if (!function_exists('random_int')) {
Expand Down

0 comments on commit 4f39309

Please sign in to comment.