From 83a9ac3ee8e949ff51bd3e52a097453f89955226 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 17 Jul 2015 13:28:48 -0700 Subject: [PATCH] Avoid using trigger_error() in addMissingMetadata() * Just use the normal swift log instead Bug: T105810 Change-Id: Ifa463e6298a1b57ab6a8d92f9defc744619d9fb6 --- includes/filebackend/SwiftFileBackend.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index 9bae2ae6c8..2ccafe4b1d 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -666,8 +666,9 @@ class SwiftFileBackend extends FileBackendStore { return $objHdrs; // nothing to do } + /** @noinspection PhpUnusedLocalVariableInspection */ $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" ); - trigger_error( "$path was not stored with SHA-1 metadata.", E_USER_WARNING ); + wfDebugLog( 'SwiftBackend', __METHOD__ . ": $path was not stored with SHA-1 metadata." ); $auth = $this->getAuthentication(); if ( !$auth ) { @@ -677,6 +678,7 @@ class SwiftFileBackend extends FileBackendStore { } $status = Status::newGood(); + /** @noinspection PhpUnusedLocalVariableInspection */ $scopeLockS = $this->getScopedFileLocks( array( $path ), LockManager::LOCK_UW, $status ); if ( $status->isOK() ) { $tmpFile = $this->getLocalCopy( array( 'src' => $path, 'latest' => 1 ) ); @@ -696,7 +698,8 @@ class SwiftFileBackend extends FileBackendStore { } } } - trigger_error( "Unable to set SHA-1 metadata for $path", E_USER_WARNING ); + + wfDebugLog( 'SwiftBackend', __METHOD__ . ": unable to set SHA-1 metadata for $path" ); $objHdrs['x-object-meta-sha1base36'] = false; return $objHdrs; // failed -- 2.20.1