Ignore:
Timestamp:
May 24, 2010, 10:12:35 PM (14 years ago)
Author:
nikrou
Message:

Fix bug 1695 : incorrect boolean to string conversion for SQLite and PostgreSQL database engines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/dblayer/functions_pgsql.inc.php

    r6090 r6339  
    511511function boolean_to_string($var)
    512512{
    513   if (!empty($var) && ($var == 't'))
    514   {
    515     return 'true';
     513  if (is_bool($var))
     514  {
     515    return $var ? 'true' : 'false';
    516516  }
    517517  else
    518518  {
    519     return 'false';
     519    return $var;
    520520  }
    521521}
Note: See TracChangeset for help on using the changeset viewer.