Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/8-fatal-error-cannot-redeclare-class'
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbyshaw committed Oct 9, 2015
2 parents bcdaa84 + af2a72f commit c58d8fe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bin/magedbm
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?php

// Avoid APC causing random fatal errors per https://github.com/composer/composer/issues/264
if (extension_loaded('apc') && ini_get('apc.enable_cli') && ini_get('apc.cache_by_default')) {
if (version_compare(phpversion('apc'), '3.0.12', '>=')) {
ini_set('apc.cache_by_default', 0);
} else {
fwrite(STDERR, 'Warning: APC <= 3.0.12 may cause fatal errors when running composer commands.'.PHP_EOL);
fwrite(STDERR, 'Update APC, or set apc.enable_cli or apc.cache_by_default to 0 in your php.ini.'.PHP_EOL);
}
}

$autoload_files = array(
__DIR__ . '/../vendor/autoload.php'
);
Expand Down

0 comments on commit c58d8fe

Please sign in to comment.