From: <var...@us...> - 2015-02-25 15:05:33
|
Revision: 9559 http://sourceforge.net/p/phpwiki/code/9559 Author: vargenau Date: 2015-02-25 15:05:31 +0000 (Wed, 25 Feb 2015) Log Message: ----------- Remove useless error handling code Modified Paths: -------------- trunk/lib/WikiDB/backend/PearDB_pgsql.php Modified: trunk/lib/WikiDB/backend/PearDB_pgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_pgsql.php 2015-02-25 15:02:48 UTC (rev 9558) +++ trunk/lib/WikiDB/backend/PearDB_pgsql.php 2015-02-25 15:05:31 UTC (rev 9559) @@ -5,7 +5,6 @@ if (!defined("USE_BYTEA")) // see schemas/psql-initialize.sql define("USE_BYTEA", true); -//define("USE_BYTEA", false); /* Since 1.3.12 changed to use: @@ -17,34 +16,6 @@ class WikiDB_backend_PearDB_pgsql extends WikiDB_backend_PearDB { - function __construct($dbparams) - { - // The pgsql handler of (at least my version of) the PEAR::DB - // library generates three warnings when a database is opened: - // - // Undefined index: options - // Undefined index: tty - // Undefined index: port - // - // This stuff is all just to catch and ignore these warnings, - // so that they don't get reported to the user. (They are - // not consequential.) - - global $ErrorManager; - $ErrorManager->pushErrorHandler(new WikiMethodCb($this, '_pgsql_open_error')); - parent::__construct($dbparams); - $ErrorManager->popErrorHandler(); - } - - function _pgsql_open_error($error) - { - if (preg_match('/^Undefined\s+index:\s+(options|tty|port)/', - $error->errstr) - ) - return true; // Ignore error - return false; - } - /** * Pack tables. * NOTE: Only the table owner can do this. Either fix the schema or setup autovacuum. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |