diff --git a/www/libs/Class.Basic.inc b/www/libs/Class.Basic.inc
index d9e38c05..755c7ef2 100644
--- a/www/libs/Class.Basic.inc
+++ b/www/libs/Class.Basic.inc
@@ -312,7 +312,7 @@
if (!session_id())
{
// check if we have an external session name given, else skip this step
- if (SET_SESSION_NAME)
+ if (isset(SET_SESSION_NAME))
{
// set the session name for possible later check
$this->session_name = SET_SESSION_NAME;
diff --git a/www/libs/Class.DB.IO.inc b/www/libs/Class.DB.IO.inc
index e622f191..b08a5670 100644
--- a/www/libs/Class.DB.IO.inc
+++ b/www/libs/Class.DB.IO.inc
@@ -1530,7 +1530,8 @@ $this->debug('ExecuteData', 'ERROR in STM['.$stm_name.'|'.$this->prepare_cursor[
// failed to get insert id
$this->insert_id = '';
$this->warning_id = 33;
- $this->_db_error('db', 'DB-Warning '.$stm_name.': insert id returned no data', 'DB_WARNING');
+ $this->_db_error();
+ $this->_db_debug('db', 'DB-Warning '.$stm_name.': insert id returned no data', 'DB_WARNING');
}
}
// this error handling is only for pgsql
diff --git a/www/libs/db_pgsql.inc b/www/libs/db_pgsql.inc
index e3845f03..98c8da9d 100644
--- a/www/libs/db_pgsql.inc
+++ b/www/libs/db_pgsql.inc
@@ -112,7 +112,10 @@
// DESC : wrapper for pg_prepare
public function _db_prepare($name, $query)
{
- return @pg_prepare($this->dbh, $name, $query);
+ $result = @pg_prepare($this->dbh, $name, $query);
+ if (!$result)
+ $this->last_error_query = $query;
+ return $result;
}
// METHOD: _db_execute
@@ -121,7 +124,10 @@
// DESC : wrapper for pg_execute for running a prepared statement
public function _db_execute($name, $data)
{
- return @pg_execute($this->dbh, $name, $data);
+ $result = @pg_execute($this->dbh, $name, $data);
+ if (!$result)
+ $this->last_error_query = $query;
+ return $result;
}
// METHOD: _db_num_rows