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_sqlite.inc.php

    r6153 r6342  
    480480function boolean_to_string($var) 
    481481{ 
    482   if (!empty($var) && ($var == 'true')) 
    483   { 
    484     return 'true'; 
     482  if (is_bool($var)) 
     483  { 
     484    return $var ? 'true' : 'false'; 
    485485  } 
    486486  else 
    487487  { 
    488     return 'false'; 
     488    return $var; 
    489489  } 
    490490} 
Note: See TracChangeset for help on using the changeset viewer.