Skip to content

Commit

Permalink
Force PHP opcache_invalidate due to upgrade error reports "Missing ve…
Browse files Browse the repository at this point in the history
…rsion directory"
  • Loading branch information
the-djmaze committed Nov 1, 2022
1 parent b9412ac commit bef1a37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@
else
{
echo '[105] Missing snappymail/v/'.APP_VERSION.'/include.php';
// opcache_reset is a terrible solution
// is_callable('opcache_reset') && opcache_reset();
// opcache_invalidate will not do everything
is_callable('opcache_invalidate') && opcache_invalidate(__FILE__, true);
exit(105);
}
3 changes: 3 additions & 0 deletions snappymail/v/0.0.0/app/libraries/snappymail/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ public static function core() : bool
} else {
throw new \Exception('Extract core files failed');
}
// opcache_reset is a terrible solution
// \is_callable('opcache_reset') && \opcache_reset();
\is_callable('opcache_invalidate') && \opcache_invalidate($target.'/index.php', true);
} finally {
$sTmp && \unlink($sTmp);
}
Expand Down

0 comments on commit bef1a37

Please sign in to comment.