Skip to content

Commit

Permalink
Prevent fatal errors when the wrong file is include()d.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Mar 3, 2017
1 parent b5ea1ef commit 13004a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/random_int.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php

if (!is_callable('random_int')) {
/**
* Random_* Compatibility Library
* for using the new PHP 7 random_* API in PHP 5 projects
Expand Down Expand Up @@ -184,3 +186,4 @@ function random_int($min, $max)

return (int)$val;
}
}

0 comments on commit 13004a7

Please sign in to comment.