Changeset 3205 in subversion


Ignore:
Timestamp:
Jan 13, 2010 7:59:21 AM (3 years ago)
Author:
alec
Message:
  • prevent from PHP error when iconv doesn't support IGNORE (#1486375)
Location:
trunk/roundcubemail/program/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/main.inc

    r3201 r3205  
    196196  // convert charset using iconv module   
    197197  if (function_exists('iconv') && $from != 'UTF-7' && $to != 'UTF-7') { 
    198     $_iconv = iconv($from, $to . '//IGNORE', $str); 
     198    $_iconv = @iconv($from, $to . '//IGNORE', $str); 
    199199    if ($_iconv !== false) { 
    200200        return $_iconv; 
  • trunk/roundcubemail/program/include/rcube_shared.inc

    r3195 r3205  
    519519    return $res; 
    520520 
    521   if (function_exists('iconv') && ($res = iconv('UTF-8', 'UTF-8//IGNORE', $input)) !== false) 
     521  if (function_exists('iconv') && ($res = @iconv('UTF-8', 'UTF-8//IGNORE', $input)) !== false) 
    522522    return $res; 
    523523 
Note: See TracChangeset for help on using the changeset viewer.