http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88261
Revision: 88261
Author: ialex
Date: 2011-05-16 19:27:54 +0000 (Mon, 16 May 2011)
Log Message:
-----------
Removed usage of error suppression operator
Modified Paths:
--------------
trunk/extensions/Configure/handler/HandlerDb.php
trunk/extensions/Configure/handler/HandlerFiles.php
Modified: trunk/extensions/Configure/handler/HandlerDb.php
===================================================================
--- trunk/extensions/Configure/handler/HandlerDb.php 2011-05-16 19:25:46 UTC
(rev 88260)
+++ trunk/extensions/Configure/handler/HandlerDb.php 2011-05-16 19:27:54 UTC
(rev 88261)
@@ -73,7 +73,9 @@
return null;
# Suppress errors, if there's an error, it'll just be null and
we'll do it again.
- $data = @unserialize( file_get_contents( $path ) );
+ wfSuppressWarnings();
+ $data = unserialize( file_get_contents( $path ) );
+ wfRestoreWarnings();
return $data;
}
@@ -85,7 +87,11 @@
protected function cacheToFS( $data ) {
global $wgConfigureFileSystemCache;
- return @file_put_contents( $wgConfigureFileSystemCache,
serialize( $data ) );
+ wfSuppressWarnings();
+ $ret = file_put_contents( $wgConfigureFileSystemCache,
serialize( $data ) );
+ wfRestoreWarnings();
+
+ return $ret;
}
/**
Modified: trunk/extensions/Configure/handler/HandlerFiles.php
===================================================================
--- trunk/extensions/Configure/handler/HandlerFiles.php 2011-05-16 19:25:46 UTC
(rev 88260)
+++ trunk/extensions/Configure/handler/HandlerFiles.php 2011-05-16 19:27:54 UTC
(rev 88261)
@@ -106,8 +106,13 @@
);
$cont = '<?php $settings = '.var_export( $settings, true ).";";
- @file_put_contents( $arch, $cont );
- return ( @file_put_contents( $cur, $cont ) !== false );
+
+ wfSuppressWarnings();
+ file_put_contents( $arch, $cont );
+ $ret = file_put_contents( $cur, $cont ) !== false;
+ wfRestoreWarnings();
+
+ return $ret;
}
/**
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs