Ignore:
Timestamp:
05/24/10 22:44:55 (9 years ago)
Author:
nikrou
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/include/dblayer/functions_pdo-sqlite.inc.php

    r6153 r6342  
    468468function boolean_to_string($var) 
    469469{ 
    470   if (!empty($var) && ($var == 'true')) 
    471   { 
    472     return 'true'; 
     470  if (is_bool($var)) 
     471  { 
     472    return $var ? 'true' : 'false'; 
    473473  } 
    474474  else 
    475475  { 
    476     return 'false'; 
     476    return $var; 
    477477  } 
    478478} 
Note: See TracChangeset for help on using the changeset viewer.