Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/155079

Change subject: Deal better with missing version stamp file
......................................................................

Deal better with missing version stamp file

Change-Id: I603c598088e86376363a5b1c7762f4ff32c9fba4
---
M sites/all/modules/wmf_common/wmf_common.module
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/79/155079/1

diff --git a/sites/all/modules/wmf_common/wmf_common.module 
b/sites/all/modules/wmf_common/wmf_common.module
index 810f20d..7f54af2 100644
--- a/sites/all/modules/wmf_common/wmf_common.module
+++ b/sites/all/modules/wmf_common/wmf_common.module
@@ -329,11 +329,13 @@
         return WMF_SOURCE_REVISION;
     } else if ( !$sourceRevision ) {
         $versionStampPath = DRUPAL_ROOT . "/.version-stamp";
-        $versionId = file_get_contents( $versionStampPath );
-        if ( $versionId !== false ) {
+        try {
+            $versionId = file_get_contents( $versionStampPath );
             $sourceRevision = trim( $versionId );
         }
-        $sourceRevision = 'unknown';
+        catch ( Exception $ex ) {
+            $sourceRevision = 'unknown';
+        }
     }
     return $sourceRevision;
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/155079
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I603c598088e86376363a5b1c7762f4ff32c9fba4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to