From: Jakub Vrana Date: Sat, 4 May 2013 17:10:06 +0000 (-0700) Subject: Fix visibility of error handlers X-Git-Tag: 1.31.0-rc.0~19770^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=26964375066318b2a581fd454972ea3dfcdde783;p=lhc%2Fweb%2Fwiklou.git Fix visibility of error handlers I've hit this error when $wgDBuser didn't have access to $wgDBname. I've also checked all other error handlers in core. An alternative approach would be to use an anonymous function but it doesn't support $this until PHP 5.4 so it would be messier. Change-Id: I89db2e8c88b84d9b53c4b828ac0208b05a3d3783 --- diff --git a/includes/db/Database.php b/includes/db/Database.php index b315facaf7..1cbffd8e28 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -772,8 +772,9 @@ abstract class DatabaseBase implements DatabaseType { /** * @param $errno * @param $errstr + * @access private */ - protected function connectionErrorHandler( $errno, $errstr ) { + public function connectionErrorHandler( $errno, $errstr ) { $this->mPHPError = $errstr; } diff --git a/includes/filebackend/FSFileBackend.php b/includes/filebackend/FSFileBackend.php index d4e32cf1ae..11a5ac961a 100644 --- a/includes/filebackend/FSFileBackend.php +++ b/includes/filebackend/FSFileBackend.php @@ -810,8 +810,9 @@ class FSFileBackend extends FileBackendStore { * @param $errno integer * @param $errstr string * @return bool + * @access private */ - private function handleWarning( $errno, $errstr ) { + public function handleWarning( $errno, $errstr ) { wfDebugLog( 'FSFileBackend', $errstr ); // more detailed error logging $this->hadWarningErrors[count( $this->hadWarningErrors ) - 1] = true; return true; // suppress from PHP handler