Skip to content

Commit

Permalink
Possible fix for #122 by coercing the autoloader to always load the `…
Browse files Browse the repository at this point in the history
…ParagonIE_Sodium_Compat` class before the remaining polyfills (constants, etc.).
  • Loading branch information
paragonie-security committed May 24, 2021
1 parent 928e056 commit 59f5946
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ function sodiumCompatAutoloader($class)
require_once dirname(__FILE__) . '/autoload-php7.php';
}

/* Explicitly, always load the Compat class: */
require_once dirname(__FILE__) . '/src/Compat.php';

if (!class_exists('SodiumException', false)) {
require_once dirname(__FILE__) . '/src/SodiumException.php';
}
Expand Down

0 comments on commit 59f5946

Please sign in to comment.