From a9f5e1b36297d92bb2b48d08cd4f3ef77cd2435d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 28 Sep 2016 13:25:21 -0700 Subject: [PATCH] Fix use of bogus $params var in FileBackend::__construct() Follows-up 81a0e79, 24aa72de, dc522cf0. Also set missing section name parameter in scopedProfileSection(). Bug: T146904 Change-Id: I897c21b766bfea4e4cb83c63f0e40e945bd73747 --- includes/libs/filebackend/FileBackend.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/libs/filebackend/FileBackend.php b/includes/libs/filebackend/FileBackend.php index 0ef9f63a60..f33f52265b 100644 --- a/includes/libs/filebackend/FileBackend.php +++ b/includes/libs/filebackend/FileBackend.php @@ -185,15 +185,15 @@ abstract class FileBackend implements LoggerAwareInterface { $this->concurrency = isset( $config['concurrency'] ) ? (int)$config['concurrency'] : 50; - $this->obResetFunc = isset( $params['obResetFunc'] ) - ? $params['obResetFunc'] + $this->obResetFunc = isset( $config['obResetFunc'] ) + ? $config['obResetFunc'] : [ $this, 'resetOutputBuffer' ]; - $this->streamMimeFunc = isset( $params['streamMimeFunc'] ) - ? $params['streamMimeFunc'] + $this->streamMimeFunc = isset( $config['streamMimeFunc'] ) + ? $config['streamMimeFunc'] : null; $this->statusWrapper = isset( $config['statusWrapper'] ) ? $config['statusWrapper'] : null; - $this->profiler = isset( $params['profiler'] ) ? $params['profiler'] : null; + $this->profiler = isset( $config['profiler'] ) ? $config['profiler'] : null; $this->logger = isset( $config['logger'] ) ? $config['logger'] : new \Psr\Log\NullLogger(); $this->statusWrapper = isset( $config['statusWrapper'] ) ? $config['statusWrapper'] : null; $this->tmpDirectory = isset( $config['tmpDirectory'] ) ? $config['tmpDirectory'] : null; @@ -1620,7 +1620,7 @@ abstract class FileBackend implements LoggerAwareInterface { protected function scopedProfileSection( $section ) { if ( $this->profiler ) { call_user_func( [ $this->profiler, 'profileIn' ], $section ); - return new ScopedCallback( [ $this->profiler, 'profileOut' ] ); + return new ScopedCallback( [ $this->profiler, 'profileOut' ], [ $section ] ); } return null; -- 2.20.1