summaryrefslogtreecommitdiffstats
path: root/php-myclabs-deep-copy-autoload.php
diff options
context:
space:
mode:
Diffstat (limited to 'php-myclabs-deep-copy-autoload.php')
-rw-r--r--php-myclabs-deep-copy-autoload.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/php-myclabs-deep-copy-autoload.php b/php-myclabs-deep-copy-autoload.php
index 7392447..26343f0 100644
--- a/php-myclabs-deep-copy-autoload.php
+++ b/php-myclabs-deep-copy-autoload.php
@@ -1,8 +1,10 @@
<?php
/* Autoloader for myclabs/deep-copy and its dependencies */
-require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
-require_once __DIR__ . '/deep_copy.php';
+if (!function_exists("DeepCopy\\deep_copy")) {
+ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+ require_once __DIR__ . '/deep_copy.php';
-\Fedora\Autoloader\Autoload::addPsr4('DeepCopy\\', __DIR__);
+ \Fedora\Autoloader\Autoload::addPsr4('DeepCopy\\', __DIR__);
+}