summaryrefslogtreecommitdiff
path: root/vendor/paragonie/random_compat/lib/error_polyfill.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2017-12-15 13:27:25 -0800
committerFrédéric Guillot <fred@kanboard.net>2017-12-15 13:27:25 -0800
commit8e6476b4028e44687e10bf7fb2617a2d2fff97d2 (patch)
treef010db02cb0ff016bdc806a0a87e1a4b21946f0a /vendor/paragonie/random_compat/lib/error_polyfill.php
parenta93b8e10f5954be0853eec693c13e84c4bd9e6f2 (diff)
Update composer dependencies
Diffstat (limited to 'vendor/paragonie/random_compat/lib/error_polyfill.php')
-rw-r--r--vendor/paragonie/random_compat/lib/error_polyfill.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/vendor/paragonie/random_compat/lib/error_polyfill.php b/vendor/paragonie/random_compat/lib/error_polyfill.php
index 57cfefdc..6a91990c 100644
--- a/vendor/paragonie/random_compat/lib/error_polyfill.php
+++ b/vendor/paragonie/random_compat/lib/error_polyfill.php
@@ -4,8 +4,8 @@
* for using the new PHP 7 random_* API in PHP 5 projects
*
* The MIT License (MIT)
- *
- * Copyright (c) 2015 Paragon Initiative Enterprises
+ *
+ * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -35,8 +35,15 @@ if (!class_exists('Error', false)) {
}
if (!class_exists('TypeError', false)) {
- class TypeError extends Error
- {
-
+ if (is_subclass_of('Error', 'Exception')) {
+ class TypeError extends Error
+ {
+
+ }
+ } else {
+ class TypeError extends Exception
+ {
+
+ }
}
}