Jakub Vrána has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/62232


Change subject: Fix visibility of error handlers
......................................................................

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
---
M includes/db/Database.php
M includes/filebackend/FSFileBackend.php
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/32/62232/1

diff --git a/includes/db/Database.php b/includes/db/Database.php
index b315fac..1cbffd8 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -772,8 +772,9 @@
        /**
         * @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 d4e32cf..11a5ac9 100644
--- a/includes/filebackend/FSFileBackend.php
+++ b/includes/filebackend/FSFileBackend.php
@@ -810,8 +810,9 @@
         * @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

-- 
To view, visit https://gerrit.wikimedia.org/r/62232
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I89db2e8c88b84d9b53c4b828ac0208b05a3d3783
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jakub Vrána <[email protected]>

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

Reply via email to