print is not a function
[lhc/web/wiklou.git] / includes / filebackend / FileBackendMultiWrite.php
index 1e98adc..17b060c 100644 (file)
@@ -343,7 +343,13 @@ class FileBackendMultiWrite extends FileBackend {
                $paths = array();
                foreach ( $ops as $op ) {
                        if ( isset( $op['src'] ) ) {
-                               $paths[] = $op['src'];
+                               // For things like copy/move/delete with "ignoreMissingSource" and there
+                               // is no source file, nothing should happen and there should be no errors.
+                               if ( empty( $op['ignoreMissingSource'] )
+                                       || $this->fileExists( array( 'src' => $op['src'] ) ) )
+                               {
+                                       $paths[] = $op['src'];
+                               }
                        }
                        if ( isset( $op['srcs'] ) ) {
                                $paths = array_merge( $paths, $op['srcs'] );
@@ -451,7 +457,7 @@ class FileBackendMultiWrite extends FileBackend {
         * @return bool Path container should have dir changes pushed to all backends
         */
        protected function replicateContainerDirChanges( $path ) {
-               list( , $shortCont,  ) = self::splitStoragePath( $path );
+               list( , $shortCont, ) = self::splitStoragePath( $path );
                return !in_array( $shortCont, $this->noPushDirConts );
        }