Skip to content

Instantly share code, notes, and snippets.

@sluc23
Created February 22, 2018 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sluc23/cb491aff6fdb3eee224045ead30e40f9 to your computer and use it in GitHub Desktop.
Save sluc23/cb491aff6fdb3eee224045ead30e40f9 to your computer and use it in GitHub Desktop.
CiviCRM 4.7 patch to avoid BOA perms issue
--- CRM/Extension/ClassLoader.php.bkp 2018-02-07 04:59:01.000000000 +0100
+++ CRM/Extension/ClassLoader.php 2018-02-22 15:30:16.242395374 +0100
@@ -82,7 +82,7 @@
}
$file = $this->getCacheFile();
- if (file_exists($file)) {
+ if (file_exists($file) && fileperms($file)) {
$loader = require $file;
}
else {
--- vendor/symfony/config/Symfony/Component/Config/ConfigCache.php.bkp 2015-07-08 07:59:48.000000000 +0200
+++ vendor/symfony/config/Symfony/Component/Config/ConfigCache.php 2018-02-22 14:54:25.098007744 +0100
@@ -60,7 +60,7 @@
*/
public function isFresh()
{
- if (!is_file($this->file)) {
+ if (!is_file($this->file) || !fileperms($this->file)) {
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment