Permalink
Browse files

ESDEV-4156 Fix "failed to open stream" error

This error was triggered after use of EE and the update of view
generator which is now sensitive to any kind of error (including
warnings and notices).
  • Loading branch information...
1 parent 32ba4b0 commit 018f8511925e31f19a77ee1ef6b266b25c2f9850 @rezonanc-oxid rezonanc-oxid committed Jan 6, 2017
Showing with 6 additions and 1 deletion.
  1. +6 −1 source/Core/Config.php
@@ -1722,7 +1722,12 @@ public function getVersion()
public function getRevision()
{
$fileName = $this->getConfigParam('sShopDir') . "/pkg.rev";
- $rev = trim(@file_get_contents($fileName));
+
+ $rev = false;
+
+ if (file_exists($fileName) && is_readable($fileName)) {
+ $rev = trim(file_get_contents($fileName));
+ }
if (!$rev) {
return false;

0 comments on commit 018f851

Please sign in to comment.