Revision: 43552
Author:   aaron
Date:     2008-11-15 11:40:10 +0000 (Sat, 15 Nov 2008)

Log Message:
-----------
* Make getCurrent() return something in last failure case
* Use more error suppression
* Remove unused var

Modified Paths:
--------------
    trunk/extensions/Configure/Configure.handler-files.php

Modified: trunk/extensions/Configure/Configure.handler-files.php
===================================================================
--- trunk/extensions/Configure/Configure.handler-files.php      2008-11-15 
11:33:51 UTC (rev 43551)
+++ trunk/extensions/Configure/Configure.handler-files.php      2008-11-15 
11:40:10 UTC (rev 43552)
@@ -33,14 +33,14 @@
                        # maybe the first time the user use this extensions, do 
not override
                        # anything
                        return array();
-               $cont = file_get_contents( $file );
+               $cont = @file_get_contents( $file );
                if ( empty( $cont ) )
                        # Weird, should not happen
                        return array();
                $arr = unserialize( $cont );
                if ( !is_array( $arr ) )
                        # Weird, should not happen too
-                       return;
+                       return array();
                return $arr;
        }
 
@@ -57,7 +57,7 @@
                        # maybe the time the user use this extensions, do not 
override
                        # anything
                        return array();
-               $cont = file_get_contents( $file );
+               $cont = @file_get_contents( $file );
                if ( empty( $cont ) )
                        # Weird, should not happen
                        return array();
@@ -98,8 +98,8 @@
                $arch = $this->getArchiveFileName();
                $cur = $this->getFileName();
                $cont = serialize( $settings );
-               file_put_contents( $arch, $cont );
-               return ( file_put_contents( $cur, $cont ) !== false );
+               @file_put_contents( $arch, $cont );
+               return ( @file_put_contents( $cur, $cont ) !== false );
        }
 
        /**
@@ -157,8 +157,6 @@
         * @return String full path to the file
         */
        public function getArchiveFileName( $ts = null ) {
-               global $IP;
-
                if ( $ts === null )
                        $ts = wfTimestampNow();
 



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

Reply via email to