Page MenuHomePhabricator

fixLastErrno.php

Authored By
bzimport
Nov 21 2014, 9:17 PM
Size
485 B
Referenced Files
None
Subscribers
None

fixLastErrno.php

Index: includes/DatabasePostgres.php
===================================================================
--- includes/DatabasePostgres.php (revision 15709)
+++ includes/DatabasePostgres.php (working copy)
@@ -309,8 +309,14 @@
return "No database connection";
}
}
- function lastErrno() { return 1; }
+ function lastErrno() {
+ if (pg_last_error()) {
+ return 1;
+ }
+ return 0;
+ }
+
function affectedRows() {
return pg_affected_rows( $this->mLastResult );
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2501
Default Alt Text
fixLastErrno.php (485 B)

Event Timeline