diff options
author | dchill42 <dchill42@gmail.com> | 2012-08-27 17:57:31 +0200 |
---|---|---|
committer | dchill42 <dchill42@gmail.com> | 2012-08-27 17:57:31 +0200 |
commit | 62ece3359211482dc5671b9521454608ad226840 (patch) | |
tree | d80aac29baaad6e9b51e865dc3ab7367c40077d4 /system | |
parent | aee9265602c3bb30a1f7f3dfd562b9b36cc612a4 (diff) | |
parent | 2d5c209943ef1e2644504e8d5cb32d3d66b45632 (diff) |
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into session
Diffstat (limited to 'system')
-rw-r--r-- | system/database/drivers/postgre/postgre_driver.php | 10 | ||||
-rw-r--r-- | system/helpers/download_helper.php | 5 | ||||
-rw-r--r-- | system/helpers/html_helper.php | 2 |
3 files changed, 14 insertions, 3 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 031740851..8c11c477b 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -132,7 +132,15 @@ class CI_DB_postgre_driver extends CI_DB { */ public function db_pconnect() { - return @pg_pconnect($this->dsn); + $conn = @pg_pconnect($this->dsn); + if ($conn && pg_connection_status($conn) === PGSQL_CONNECTION_BAD) + { + if (pg_ping($conn) === FALSE) + { + return FALSE; + } + } + return $conn; } // -------------------------------------------------------------------- diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 09c4de578..0232adfe4 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -95,7 +95,10 @@ if ( ! function_exists('force_download')) } // Clean output buffer - ob_clean(); + if (ob_get_level() !== 0) + { + ob_clean(); + } // Generate the server headers header('Content-Type: '.$mime); diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 9843e804e..2372e8174 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -215,7 +215,7 @@ if ( ! function_exists('img')) } } - return $img._stringify_attributes($attributes).'/>'; + return $img._stringify_attributes($attributes).' />'; } } |