Ejegg has uploaded a new change for review.

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

Change subject: Fix DB error logging
......................................................................

Fix DB error logging

Need to get the errorInfo from the prepared statement, not the db
handle. Also, fix print_r.

Change-Id: Icc15d962078a85f188faaa605412fd53a5a8c350
---
M Core/DataStores/SmashPigDatabase.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/73/315573/1

diff --git a/Core/DataStores/SmashPigDatabase.php 
b/Core/DataStores/SmashPigDatabase.php
index 0ce040f..48f78b4 100644
--- a/Core/DataStores/SmashPigDatabase.php
+++ b/Core/DataStores/SmashPigDatabase.php
@@ -90,7 +90,7 @@
                }
 
                if ( !$prepared->execute() ) {
-                       $info = print_r( $this->getDatabase()->errorInfo() );
+                       $info = print_r( $prepared->errorInfo(), true );
                        throw new DataStoreException( "Failed to execute $sql: 
$info" );
                }
                return $prepared;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc15d962078a85f188faaa605412fd53a5a8c350
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to